Sky.Net/client/src/app/app-routing.module.ts

25 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-05-12 11:53:03 -07:00
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
2022-05-13 16:58:42 -07:00
import { NotFoundComponent } from './core/not-found/not-found.component';
import { ServerErrorComponent } from './core/server-error/server-error.component';
import { TestErrorComponent } from './core/test-error/test-error.component';
2022-05-13 15:33:15 -07:00
import { HomeComponent } from './home/home.component';
const routes: Routes = [
2022-05-16 15:52:55 -07:00
{path: '', component: HomeComponent, data: {breadcrumb: 'Home'}},
{path: 'test-error', component: TestErrorComponent, data: {breadcrumb: 'Test Errors'}},
{path: 'server-error', component: ServerErrorComponent, data: {breadcrumb: 'Server Error'}},
{path: 'not-found', component: NotFoundComponent, data: {breadcrumb: 'Not Found'}},
{path: 'shop', loadChildren: ()=> import('./shop/shop.module').then(mod => mod.ShopModule), data: {breadcrumb: 'Shop'}},
2022-05-18 16:28:29 -07:00
{path: 'basket', loadChildren: ()=> import('./basket/basket.module').then(mod => mod.BasketModule), data: {breadcrumb: 'Shopping Cart'}},
2022-05-19 13:50:10 -07:00
{path: 'checkout', loadChildren: ()=> import('./checkout/checkout.module').then(mod => mod.CheckoutModule), data: {breadcrumb: 'Checkout'}},
2022-05-16 15:52:55 -07:00
{path: '**', redirectTo: 'not-found', pathMatch: 'full'}
2022-05-13 15:33:15 -07:00
];
2022-05-12 11:53:03 -07:00
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }