Project

General

Profile

1
import {NgModule} from '@angular/core';
2
import {RouterModule} from '@angular/router';
3
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
4
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
5
import {MonitorComponent} from "./monitor.component";
6
import {EnvironmentSpecificResolver} from "../openaireLibrary/utils/properties/environmentSpecificResolver";
7

    
8
@NgModule({
9
  imports: [
10
    RouterModule.forChild([
11
      {path: '', redirectTo: '/admin', pathMatch: 'full'},
12
      {
13
        path: ':stakeholder',
14
        component: MonitorComponent,
15
        canActivate: [FreeGuard],
16
        canDeactivate: [PreviousRouteRecorder]
17
      },
18
      {
19
        path: ':stakeholder/search',
20
        loadChildren: '../search/search.module#SearchModule',
21
        resolve: {envSpecific: EnvironmentSpecificResolver}
22
      },
23
      {
24
        path: ':stakeholder/:topic',
25
        component: MonitorComponent,
26
        canActivate: [FreeGuard],
27
        canDeactivate: [PreviousRouteRecorder]
28
      },
29
      {
30
        path: ':stakeholder/:topic/:category',
31
        component: MonitorComponent,
32
        canActivate: [FreeGuard],
33
        canDeactivate: [PreviousRouteRecorder]
34
      },
35
      {
36
        path: ':stakeholder/:topic/:category/:subCategory',
37
        component: MonitorComponent,
38
        canActivate: [FreeGuard],
39
        canDeactivate: [PreviousRouteRecorder]
40
      }
41
    ])
42
  ]
43
})
44
export class MonitorRoutingModule {
45
}
(1-1/5)