21 lines
844 B
TypeScript
21 lines
844 B
TypeScript
|
import { NgModule } from '@angular/core';
|
||
|
import { RouterModule } from '@angular/router';
|
||
|
import { OpenaireLinkingComponent } from './linkingGeneric.component';
|
||
|
|
||
|
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
|
||
|
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||
|
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
||
|
import {ConnectSubscriberGuard} from '../../openaireLibrary/connect/communityGuard/connectSubscriber.guard';
|
||
|
|
||
|
@NgModule({
|
||
|
imports: [
|
||
|
RouterModule.forChild([
|
||
|
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard, ConnectSubscriberGuard], data: {
|
||
|
redirect: '/error'
|
||
|
}, canDeactivate: [PreviousRouteRecorder]},
|
||
|
|
||
|
])
|
||
|
]
|
||
|
})
|
||
|
export class LinkingRoutingModule { }
|