import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {MonitorComponent} from "./monitor.component"; import {OpenaireErrorPageComponent} from "../error/errorPage.component"; @NgModule({ imports: [ RouterModule.forChild([ {path: '', redirectTo: '/admin', pathMatch: 'full'}, { path: ':stakeholder', component: MonitorComponent, canDeactivate: [PreviousRouteRecorder], data: { activeMenuItem: "dashboard" } }, { path: ':stakeholder/indicators/themes', loadChildren: () => import('../openaireLibrary/monitor/indicators/indicator-themes.module').then(m => m.IndicatorThemesModule), canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false } }, { path: ':stakeholder/indicators/:type', loadChildren: () => import('../openaireLibrary/monitor/indicators/indicators.module').then(m => m.IndicatorsModule), canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false } }, { path: ':stakeholder/develop', loadChildren: () => import('../develop/develop.module').then(m => m.DevelopModule), canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false } }, { path: ':stakeholder/methodology', loadChildren: () => import('../openaireLibrary/monitor/methodology/methodology.module').then(m => m.MethodologyModule), canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false } }, { path: ':stakeholder/search', loadChildren: () => import('../search/search.module').then(m => m.SearchModule), canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false, activeMenuItem: "search" } }, { path: ':stakeholder/error', component: OpenaireErrorPageComponent, data: {hasSidebar: false} }, { path: ':stakeholder/user-info', loadChildren: () => import('../login/libUser.module').then(m => m.LibUserModule), data: {hasSidebar: false} }, { path: ':stakeholder/:topic', component: MonitorComponent, canDeactivate: [PreviousRouteRecorder], data: { activeMenuItem: "dashboard" } }, { path: ':stakeholder/:topic/:category', component: MonitorComponent, canDeactivate: [PreviousRouteRecorder], data: { activeMenuItem: "dashboard" } }, { path: ':stakeholder/:topic/:category/:subCategory', component: MonitorComponent, canDeactivate: [PreviousRouteRecorder], data: { activeMenuItem: "dashboard" } } ]) ] }) export class MonitorRoutingModule { }