2016-06-09 13:00:26 -05:00
|
|
|
// #docregion
|
2016-08-14 13:54:33 -05:00
|
|
|
import { ModuleWithProviders } from '@angular/core';
|
2016-08-09 17:38:25 +01:00
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
|
2016-07-16 17:34:26 -05:00
|
|
|
import { HeroListComponent } from './hero-list.component';
|
|
|
|
import { HeroDetailComponent } from './hero-detail.component';
|
2016-06-09 13:00:26 -05:00
|
|
|
|
2016-08-09 17:38:25 +01:00
|
|
|
const heroesRoutes: Routes = [
|
2016-06-17 22:55:36 -04:00
|
|
|
{ path: 'heroes', component: HeroListComponent },
|
2016-06-09 13:00:26 -05:00
|
|
|
// #docregion hero-detail-route
|
2016-06-17 22:55:36 -04:00
|
|
|
{ path: 'hero/:id', component: HeroDetailComponent }
|
2016-06-09 13:00:26 -05:00
|
|
|
// #enddocregion hero-detail-route
|
|
|
|
];
|
2016-08-09 17:38:25 +01:00
|
|
|
|
2016-08-14 13:54:33 -05:00
|
|
|
export const heroesRouting: ModuleWithProviders = RouterModule.forChild(heroesRoutes);
|
2016-06-09 13:00:26 -05:00
|
|
|
// #enddocregion
|