import { Routes } from '@angular/router' ; import { BookExistsGuard } from './guards/book-exists' ; import { FindBookPageComponent } from './containers/find-book-page' ; import { ViewBookPageComponent } from './containers/view-book-page' ; import { CollectionPageComponent } from './containers/collection-page' ; import { NotFoundPageComponent } from './containers/not-found-page' ; export const routes = [ { path : '' , component : CollectionPageComponent } , { path : 'book/find' , component : FindBookPageComponent } , { path : 'book/:id' , canActivate : [ BookExistsGuard ] , component : ViewBookPageComponent } , { path : 'stats' , loadChildren : './+lazy-stats/lazy-stats.module#LazyStatsModule' } , { path : '**' , component : NotFoundPageComponent } ] ;