angular-docs-cn/public/docs/_examples/router/ts/app/app-routing.module.2.ts
Brandon Roberts 1afe5dc97d docs(router): Updated usage of observables in router tutorial and developer guide
Moved route configuration into separate variable for consistency
Added async pipe to handle subscriptions for list items
2016-11-14 11:05:29 -08:00

21 lines
433 B
TypeScript

// #docplaster
// #docregion
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CrisisListComponent } from './crisis-list.component';
const appRoutes: Routes = [
{ path: 'crisis-center', component: CrisisListComponent }
];
@NgModule({
imports: [
RouterModule.forRoot(appRoutes)
],
exports: [
RouterModule
]
})
export class AppRoutingModule {}