Project

General

Profile

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
import {RegistrationComponent} from './registration.component';
8

    
9
const adminRoutes: Routes = [
10
  {
11
    path: '',
12
    component: AdminPgComponent,
13
    canActivate: [AuthGuardService],
14
    canLoad: [AuthGuardService],
15
    children: [
16
      {
17
        path: 'metrics',
18
        component: AdminPgMetricsComponent
19
      },
20
      {
21
        path: 'registrations/:page/:pageSize',
22
        component: RegistrationComponent
23
      }
24
    ]
25
  }
26
];
27

    
28
@NgModule ({
29
  imports: [RouterModule.forChild(adminRoutes)],
30
  exports: [RouterModule]
31
})
32

    
33
export class AdminPgRouting {}
(5-5/8)