import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; 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, canDeactivate: [PreviousRouteRecorder] }, { path: ':stakeholder/develop', loadChildren: () => import('../develop/develop.module').then(m => m.DevelopModule), canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false, isDashboard: false } }, { path: ':stakeholder/methodology', loadChildren: () => import('../methodology/methodology.module').then(m => m.MethodologyModule), canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false, isDashboard: false } }, { path: ':stakeholder/search', loadChildren: () => import('../search/search.module').then(m => m.SearchModule), canDeactivate: [PreviousRouteRecorder] }, { path: ':stakeholder/:topic', component: MonitorComponent, canDeactivate: [PreviousRouteRecorder] }, { path: ':stakeholder/:topic/:category', component: MonitorComponent, canDeactivate: [PreviousRouteRecorder] }, { path: ':stakeholder/:topic/:category/:subCategory', component: MonitorComponent, canDeactivate: [PreviousRouteRecorder] } ]) ] }) export class MonitorRoutingModule { }