projects
/
examples
/
angular-tour-of-heroes
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
5: Add In-app Navigation
[examples/angular-tour-of-heroes]
/
src
/
app
/
app-routing.module.ts
diff --git
a/src/app/app-routing.module.ts
b/src/app/app-routing.module.ts
index
807a865
..
b0354f5
100644
(file)
--- a/
src/app/app-routing.module.ts
+++ b/
src/app/app-routing.module.ts
@@
-1,10
+1,13
@@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HeroesComponent } from './heroes/heroes.component';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HeroesComponent } from './heroes/heroes.component';
+import { DashboardComponent } from './dashboard/dashboard.component';
const routes : Routes = [
const routes : Routes = [
- { path: 'heroes', component: HeroesComponent }
+ { path: '', redirectTo: 'dashboard', pathMatch: 'full'},
+ { path: 'heroes', component: HeroesComponent },
+ { path: 'dashboard', component: DashboardComponent }
];
];