2020-08-12 17:16:54 +02:00
|
|
|
import {NgModule} from '@angular/core';
|
|
|
|
import {RouterModule} from '@angular/router';
|
|
|
|
import {OpenaireLinkingComponent} from './linkingGeneric.component';
|
2018-02-15 12:12:55 +01:00
|
|
|
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
|
|
|
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
|
2018-04-16 13:50:13 +02:00
|
|
|
import {ConnectSubscriberGuard} from '../../openaireLibrary/connect/communityGuard/connectSubscriber.guard';
|
2020-11-12 16:59:26 +01:00
|
|
|
import {LoginGuard} from "../../openaireLibrary/login/loginGuard.guard";
|
2020-08-12 17:16:54 +02:00
|
|
|
|
2018-01-26 16:00:07 +01:00
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
RouterModule.forChild([
|
2020-11-12 16:59:26 +01:00
|
|
|
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard, ConnectSubscriberGuard ], data: {
|
2018-04-16 13:50:13 +02:00
|
|
|
redirect: '/error'
|
2018-01-26 16:00:07 +01:00
|
|
|
}, canDeactivate: [PreviousRouteRecorder]},
|
|
|
|
|
|
|
|
])
|
|
|
|
]
|
|
|
|
})
|
|
|
|
export class LinkingRoutingModule { }
|