Guest User

Untitled

a guest
Jan 24th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <app-header></app-header>
  2.  
  3. <router-outlet></router-outlet>
  4. <app-footer></app-footer>
  5.  
  6. import { RouterModule, Routes } from '@angular/router';
  7. const appRoutes: Routes = [
  8. { path: 'crisis-center', component: CrisisListComponent },
  9. { path: 'hero/:id', component: HeroDetailComponent },
  10. {
  11. path: 'heroes',
  12. component: HeroListComponent,
  13. data: { title: 'Heroes List' }
  14. },
  15. { path: '',
  16. redirectTo: '/heroes',
  17. pathMatch: 'full'
  18. },
  19. { path: '**', component: PageNotFoundComponent }
  20. ];
  21.  
  22. @NgModule({
  23. imports: [
  24. RouterModule.forRoot(
  25. appRoutes,
  26. { enableTracing: true } // <-- debugging purposes only
  27. )
  28. // other imports here
  29. ],
  30. ...
  31. })
  32. export class AppModule { }
Add Comment
Please, Sign In to add comment