Files
bookstore-angular/store-front/src/app/app.routing.ts
Le Deng 4765a6c5ff latest
2017-03-09 18:27:01 -05:00

42 lines
1.0 KiB
TypeScript

/**
* Created by z00382545 on 1/16/17.
*/
import {ModuleWithProviders} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {HomeComponent} from './components/home/home.component';
import {MyAccountComponent} from './components/my-account/my-account.component';
import {MyProfileComponent} from './components/my-profile/my-profile.component';
import {BookListComponent} from './components/book-list/book-list.component';
import {BookDetailComponent} from './components/book-detail/book-detail.component';
const appRoutes: Routes = [
{
path: '',
redirectTo: '/home',
pathMatch: 'full'
},
{
path: 'home',
component: HomeComponent
},
{
path: 'myAccount',
component: MyAccountComponent
},
{
path: 'myProfile',
component: MyProfileComponent
},
{
path: 'bookList',
component: BookListComponent
},
{
path: 'bookDetail/:id',
component: BookDetailComponent
}
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);