Project

General

Profile

1
/**
2
 * Created by myrto on 11/27/17.
3
 */
4
import { RouterModule, Routes } from '@angular/router';
5
import { MetricsEnableComponent } from './metrics-enable.component';
6
import { MetricsShowComponent } from './metrics-show.component';
7
import { MetricsInstructionsComponent } from './metrics-instructions.component';
8
import { MetricsUsagestatsComponent } from './metrics-usagestats.component';
9
import { MetricsUsagestatsReportComponent } from './metrics-usagestats-report.component';
10
import { MetricsUsagestatsReportResultsComponent } from './metrics-usagestats-report-results.component';
11
import { NgModule } from '@angular/core';
12

    
13
const metricsRoutes: Routes = [
14
  {
15
    path: '',
16
    children: [
17
      {
18
        path: '',
19
        redirectTo: 'enable',
20
        // pathMatch: 'full'
21
      },
22
      {
23
        path: 'enable',
24
        component: MetricsEnableComponent
25
      },
26
      {
27
        path: 'show_metrics',
28
        component: MetricsShowComponent
29
      },
30
      {
31
        path: 'instructions',
32
        component: MetricsInstructionsComponent
33
      },
34
      {
35
        path: 'usagestats',
36
        component: MetricsUsagestatsComponent
37
      },
38
      {
39
        path: 'usagestats/:reportID',
40
        component: MetricsUsagestatsReportComponent
41
      },
42
      {
43
        path: 'usagestats-report-results',
44
        component: MetricsUsagestatsReportResultsComponent
45
      }
46
    ]
47
  }
48
];
49

    
50

    
51
@NgModule ({
52
  imports: [RouterModule.forChild(metricsRoutes)],
53
  exports: [RouterModule]
54
})
55

    
56
export class MetricsRouting {}
57

    
(15-15/15)