Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import { NgModule } from '@angular/core';
  2. import {Routes, RouterModule} from '@angular/router';
  3.  
  4. import { BookDetailsComponent } from './book-details/book-details.component';
  5. import { BookListComponent } from './book-list/book-list.component';
  6. import { HomeComponent } from './home/home.component';
  7.  
  8. const routes: Routes = [
  9. { path: '', redirectTo: 'home', pathMatch: 'full' },
  10. { path: 'home', component: HomeComponent },
  11. { path: 'books', component: BookListComponent },
  12. { path: 'books/:isbn', component: BookDetailsComponent }
  13. ];
  14.  
  15. @NgModule({
  16. imports: [RouterModule.forRoot(routes)],
  17. exports: [RouterModule],
  18. providers: []
  19. })
  20. export class AppRoutingModule { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement