Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { NgModule } from '@angular/core';
- import {Routes, RouterModule} from '@angular/router';
- import { BookDetailsComponent } from './book-details/book-details.component';
- import { BookListComponent } from './book-list/book-list.component';
- import { HomeComponent } from './home/home.component';
- const routes: Routes = [
- { path: '', redirectTo: 'home', pathMatch: 'full' },
- { path: 'home', component: HomeComponent },
- { path: 'books', component: BookListComponent },
- { path: 'books/:isbn', component: BookDetailsComponent }
- ];
- @NgModule({
- imports: [RouterModule.forRoot(routes)],
- exports: [RouterModule],
- providers: []
- })
- export class AppRoutingModule { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement