1
|
import { NgModule } from '@angular/core';
|
2
|
import { RouterModule, Routes } from '@angular/router';
|
3
|
|
4
|
import { AdminPgComponent } from './adminPg.component';
|
5
|
import { AdminPgMetricsComponent } from './adminPg-metrics.component';
|
6
|
import { AuthGuardService } from '../../services/auth-guard.service';
|
7
|
|
8
|
const adminRoutes: Routes = [
|
9
|
{
|
10
|
path: '',
|
11
|
component: AdminPgComponent,
|
12
|
canActivate: [AuthGuardService],
|
13
|
canLoad: [AuthGuardService],
|
14
|
children: [
|
15
|
{
|
16
|
path: 'metrics',
|
17
|
component: AdminPgMetricsComponent
|
18
|
}
|
19
|
]
|
20
|
}
|
21
|
];
|
22
|
|
23
|
@NgModule ({
|
24
|
imports: [RouterModule.forChild(adminRoutes)],
|
25
|
exports: [RouterModule]
|
26
|
})
|
27
|
|
28
|
export class AdminPgRouting {}
|