SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 { }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top