You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
830 B
TypeScript
21 lines
830 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { HomeComponent } from './components/home/home.component';
|
|
import { ProductItemDetailsComponent } from './components/product-item-details/product-item-details.component';
|
|
import { CartComponent } from './components/cart/cart.component';
|
|
import { ConfirmationComponent } from './components/confirmation/confirmation.component';
|
|
|
|
const routes: Routes = [
|
|
{ path: '', component: HomeComponent },
|
|
{ path: 'product/:id', component: ProductItemDetailsComponent },
|
|
{ path: 'cart', component: CartComponent },
|
|
{ path: 'confirmation', component: ConfirmationComponent},
|
|
{ path: '**', redirectTo: '/' }
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|