1
|
/**
|
2
|
* Created by myrto on 11/27/17.
|
3
|
*/
|
4
|
import { NgModule } from "@angular/core";
|
5
|
import { RouterModule, Routes } from "@angular/router";
|
6
|
import { MetricsComponent } from './metrics.component';
|
7
|
import { MetricsEnableComponent } from './metrics-enable.component';
|
8
|
import { MetricsInstructionsComponent } from './metrics-instructions.component';
|
9
|
import { AuthGuardService } from '../../services/auth-guard.service';
|
10
|
import { MetricsShowComponent } from './metrics-show.component';
|
11
|
|
12
|
const metricsRoutes: Routes = [
|
13
|
{
|
14
|
path: 'getImpact',
|
15
|
canActivate: [AuthGuardService],
|
16
|
children: [
|
17
|
{
|
18
|
path: '',
|
19
|
component: MetricsComponent,
|
20
|
},
|
21
|
{
|
22
|
path: 'enable/:id',
|
23
|
component: MetricsEnableComponent
|
24
|
},
|
25
|
{
|
26
|
path: 'show_metrics/:id',
|
27
|
component: MetricsShowComponent
|
28
|
},
|
29
|
{
|
30
|
path: 'instructions/:id',
|
31
|
component: MetricsInstructionsComponent
|
32
|
}
|
33
|
]
|
34
|
}
|
35
|
];
|
36
|
|
37
|
|
38
|
@NgModule ({
|
39
|
imports: [RouterModule.forChild(metricsRoutes)],
|
40
|
exports: [RouterModule]
|
41
|
})
|
42
|
|
43
|
export class MetricsRouting {}
|
44
|
|