From 69199bd41e5fa7597890f5ac3f4d41ef0b7c3ea4 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 16 Jun 2017 17:39:58 -0400 Subject: [PATCH] copy/paste --- src/app/app-routing.module.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index e69de29..1f1e1ca 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +  +import { DashboardComponent } from './dashboard.component'; +import { HeroesComponent } from './heroes.component'; +import { HeroDetailComponent } from './hero-detail.component'; +  +const routes: Routes = [ + { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, + { path: 'dashboard', component: DashboardComponent }, + { path: 'detail/:id', component: HeroDetailComponent }, + { path: 'heroes', component: HeroesComponent } +]; +  +@NgModule({ + imports: [ RouterModule.forRoot(routes) ], + exports: [ RouterModule ] +}) +export class AppRoutingModule {}