32 lines
941 B
TypeScript
32 lines
941 B
TypeScript
|
|
// #docplaster
|
||
|
|
// #docregion
|
||
|
|
import { ModuleWithProviders } from '@angular/core';
|
||
|
|
import { Routes, RouterModule } from '@angular/router';
|
||
|
|
|
||
|
|
import { AdminComponent } from './admin.component';
|
||
|
|
import { AdminDashboardComponent } from './admin-dashboard.component';
|
||
|
|
import { ManageCrisesComponent } from './manage-crises.component';
|
||
|
|
import { ManageHeroesComponent } from './manage-heroes.component';
|
||
|
|
|
||
|
|
// #docregion admin-routes
|
||
|
|
const adminRoutes: Routes = [
|
||
|
|
{
|
||
|
|
path: 'admin',
|
||
|
|
component: AdminComponent,
|
||
|
|
children: [
|
||
|
|
{
|
||
|
|
path: '',
|
||
|
|
children: [
|
||
|
|
{ path: 'crises', component: ManageCrisesComponent },
|
||
|
|
{ path: 'heroes', component: ManageHeroesComponent },
|
||
|
|
{ path: '', component: AdminDashboardComponent }
|
||
|
|
]
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
];
|
||
|
|
|
||
|
|
export const adminRouting: ModuleWithProviders = RouterModule.forChild(adminRoutes);
|
||
|
|
// #enddocregion admin-routes
|
||
|
|
// #enddocregion
|