|
@@ -1,12 +1,21 @@
|
|
| 1 |
import { Routes } from '@angular/router';
|
| 2 |
|
| 3 |
-
import { HomePage } from './home-page/home-page';
|
| 4 |
-
import { booksPortalRoutes } from './books-portal/books-portal.routes';
|
| 5 |
-
import { booksAdminRoutes } from './books-admin/books-admin.routes';
|
| 6 |
-
|
| 7 |
export const routes: Routes = [
|
| 8 |
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
| 9 |
-
{
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
];
|
|
|
|
| 1 |
import { Routes } from '@angular/router';
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
export const routes: Routes = [
|
| 4 |
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
| 5 |
+
{
|
| 6 |
+
path: 'home',
|
| 7 |
+
title: 'BookMonkey',
|
| 8 |
+
loadComponent: () => import('./home-page/home-page')
|
| 9 |
+
.then(m => m.HomePage)
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
path: 'books',
|
| 13 |
+
loadChildren: () => import('./books-portal/books-portal.routes')
|
| 14 |
+
.then(m => m.booksPortalRoutes)
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
path: 'admin',
|
| 18 |
+
loadChildren: () => import('./books-admin/books-admin.routes')
|
| 19 |
+
.then(m => m.booksAdminRoutes)
|
| 20 |
+
}
|
| 21 |
];
|
|
@@ -3,6 +3,6 @@ import { Routes } from '@angular/router';
|
|
| 3 |
import { BookCreatePage } from './book-create-page/book-create-page';
|
| 4 |
|
| 5 |
export const booksAdminRoutes: Routes = [
|
| 6 |
-
{ path: '
|
| 7 |
-
{ path: '
|
| 8 |
];
|
|
|
|
| 3 |
import { BookCreatePage } from './book-create-page/book-create-page';
|
| 4 |
|
| 5 |
export const booksAdminRoutes: Routes = [
|
| 6 |
+
{ path: '', redirectTo: 'create', pathMatch: 'full' },
|
| 7 |
+
{ path: 'create', component: BookCreatePage, title: 'Create Book' }
|
| 8 |
];
|
|
@@ -4,6 +4,6 @@ import { BooksOverviewPage } from './books-overview-page/books-overview-page';
|
|
| 4 |
import { BookDetailsPage } from './book-details-page/book-details-page';
|
| 5 |
|
| 6 |
export const booksPortalRoutes: Routes = [
|
| 7 |
-
{ path: '
|
| 8 |
-
{ path: '
|
| 9 |
];
|
|
|
|
| 4 |
import { BookDetailsPage } from './book-details-page/book-details-page';
|
| 5 |
|
| 6 |
export const booksPortalRoutes: Routes = [
|
| 7 |
+
{ path: '', component: BooksOverviewPage, title: 'Books' },
|
| 8 |
+
{ path: 'details/:isbn', component: BookDetailsPage, title: 'Book Details' },
|
| 9 |
];
|