1
|
import { NgModule } from '@angular/core';
|
2
|
import { RouterModule } from '@angular/router';
|
3
|
import { OpenaireLinkingComponent } from './linkingGeneric.component';
|
4
|
|
5
|
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
6
|
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
7
|
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
8
|
import {ConnectSubscriberGuard} from '../../openaireLibrary/connect/communityGuard/connectSubscriber.guard';
|
9
|
|
10
|
@NgModule({
|
11
|
imports: [
|
12
|
RouterModule.forChild([
|
13
|
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard, ConnectSubscriberGuard], data: {
|
14
|
redirect: '/error'
|
15
|
}, canDeactivate: [PreviousRouteRecorder]},
|
16
|
|
17
|
])
|
18
|
]
|
19
|
})
|
20
|
export class LinkingRoutingModule { }
|