2016-08-14 13:54:33 -05:00
|
|
|
import { ModuleWithProviders } from '@angular/core';
|
2016-07-12 18:14:13 -07:00
|
|
|
import { Routes,
|
2016-08-23 00:17:18 -07:00
|
|
|
RouterModule } from '@angular/router';
|
2016-07-12 18:14:13 -07:00
|
|
|
|
2016-08-23 00:17:18 -07:00
|
|
|
import { HeroComponent } from './hero.component';
|
|
|
|
import { HeroListComponent } from './hero-list.component';
|
|
|
|
import { HeroDetailComponent } from './hero-detail.component';
|
2016-07-12 18:14:13 -07:00
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{ path: '',
|
|
|
|
component: HeroComponent,
|
|
|
|
children: [
|
|
|
|
{ path: '', component: HeroListComponent },
|
|
|
|
{ path: ':id', component: HeroDetailComponent }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2016-08-14 13:54:33 -05:00
|
|
|
export const routing: ModuleWithProviders = RouterModule.forChild(routes);
|