Project

General

Profile

1
import {NgModule} from '@angular/core';
2
import {RouterModule} from '@angular/router';
3
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
4
import {MonitorComponent} from "./monitor.component";
5

    
6
@NgModule({
7
  imports: [
8
    RouterModule.forChild([
9
      {path: '', redirectTo: '/admin', pathMatch: 'full'},
10
      {
11
        path: ':stakeholder',
12
        component: MonitorComponent,
13
        canDeactivate: [PreviousRouteRecorder]
14
      },
15
      {
16
        path: ':stakeholder/develop',
17
        loadChildren: () => import('../develop/develop.module').then(m => m.DevelopModule),
18
        canDeactivate: [PreviousRouteRecorder],
19
        data: {
20
          hasSidebar: false,
21
          isDashboard: false
22
        }
23
      },
24
      {
25
        path: ':stakeholder/methodology',
26
        loadChildren: () => import('../methodology/methodology.module').then(m => m.MethodologyModule),
27
        canDeactivate: [PreviousRouteRecorder],
28
        data: {
29
          hasSidebar: false,
30
          isDashboard: false
31
        }
32
      },
33
      {
34
        path: ':stakeholder/search',
35
        loadChildren: () => import('../search/search.module').then(m => m.SearchModule),
36
        canDeactivate: [PreviousRouteRecorder]
37
      },
38
      {
39
        path: ':stakeholder/:topic',
40
        component: MonitorComponent,
41
        canDeactivate: [PreviousRouteRecorder]
42
      },
43
      {
44
        path: ':stakeholder/:topic/:category',
45
        component: MonitorComponent,
46
        canDeactivate: [PreviousRouteRecorder]
47
      },
48
      {
49
        path: ':stakeholder/:topic/:category/:subCategory',
50
        component: MonitorComponent,
51
        canDeactivate: [PreviousRouteRecorder]
52
      }
53
    ])
54
  ]
55
})
56
export class MonitorRoutingModule {
57
}
(1-1/5)