
This commit updates the docs examples to be compatible with the `import-spacing` tslint rule. This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close #38143
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
// #docplaster
|
|
// #docregion
|
|
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
import { AdminComponent } from './admin/admin.component';
|
|
import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component';
|
|
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
|
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
|
|
|
import { AuthGuard } from '../auth/auth.guard';
|
|
|
|
const adminRoutes: Routes = [
|
|
{
|
|
path: '',
|
|
component: AdminComponent,
|
|
canActivate: [AuthGuard],
|
|
children: [
|
|
{
|
|
path: '',
|
|
canActivateChild: [AuthGuard],
|
|
children: [
|
|
{ path: 'crises', component: ManageCrisesComponent },
|
|
{ path: 'heroes', component: ManageHeroesComponent },
|
|
{ path: '', component: AdminDashboardComponent }
|
|
]
|
|
}
|
|
]
|
|
}
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forChild(adminRoutes)
|
|
],
|
|
exports: [
|
|
RouterModule
|
|
]
|
|
})
|
|
export class AdminRoutingModule {}
|
|
// #enddocregion
|