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';
|
|
|
|
import { ProductDetailsComponent } from './shop/product-details/product-details.component';
|
|
|
|
import { ShopComponent } from './shop/shop.component';
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{path: '', component: HomeComponent},
|
2022-05-13 16:58:42 -07:00
|
|
|
{path: 'test-error', component: TestErrorComponent},
|
|
|
|
{path: 'server-error', component: ServerErrorComponent},
|
|
|
|
{path: 'not-found', component: NotFoundComponent},
|
2022-05-13 15:33:15 -07:00
|
|
|
{path: 'shop', loadChildren: ()=> import('./shop/shop.module').then(mod => mod.ShopModule)},
|
|
|
|
{path: '**', redirectTo: '', pathMatch: 'full'}
|
|
|
|
];
|
2022-05-12 11:53:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forRoot(routes)],
|
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class AppRoutingModule { }
|