5: Add In-app Navigation
[examples/angular-tour-of-heroes] / src / app / app-routing.module.ts
index b0354f5..2a250c9 100644 (file)
@@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
 import { HeroesComponent } from './heroes/heroes.component';
 import { DashboardComponent } from './dashboard/dashboard.component';
+import { HeroDetailComponent} from './hero-detail/hero-detail.component';
 
 
 const routes : Routes = [
   { path: '', redirectTo: 'dashboard', pathMatch: 'full'},
   { path: 'heroes', component: HeroesComponent },
+  { path: 'detail/:id', component: HeroDetailComponent },
   { path: 'dashboard', component: DashboardComponent }
 ];