X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Fapp-routing.module.ts;h=2a250c9ca036de19fd29c00c3a9363a2a4f81e96;hb=50aeef7b5e0e7f75d1a1de38e2a45bf1953de785;hp=807a865cb0d4fdd3ff850a745876708164c19f88;hpb=bf2c0b48e2a1a30943716a66b72ae0f1e9de2d6f;p=examples%2Fangular-tour-of-heroes diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 807a865..2a250c9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,10 +1,15 @@ 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: 'heroes', component: HeroesComponent } + { path: '', redirectTo: 'dashboard', pathMatch: 'full'}, + { path: 'heroes', component: HeroesComponent }, + { path: 'detail/:id', component: HeroDetailComponent }, + { path: 'dashboard', component: DashboardComponent } ];