monitor-dashboard/src/app/monitor/monitor-routing.module.ts

40 lines
1.2 KiB
TypeScript
Raw Normal View History

import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {MonitorComponent} from "./monitor.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', redirectTo: '/admin', pathMatch: 'full'},
{
path: ':stakeholder',
component: MonitorComponent,
canActivate: [FreeGuard],
canDeactivate: [PreviousRouteRecorder]
},
{
path: ':stakeholder/:topic',
component: MonitorComponent,
canActivate: [FreeGuard],
canDeactivate: [PreviousRouteRecorder]
},
{
path: ':stakeholder/:topic/:category',
component: MonitorComponent,
canActivate: [FreeGuard],
canDeactivate: [PreviousRouteRecorder]
},
{
path: ':stakeholder/:topic/:category/:subCategory',
component: MonitorComponent,
canActivate: [FreeGuard],
canDeactivate: [PreviousRouteRecorder]
}
])
]
})
export class MonitorRoutingModule {
}