import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { NewProductComponent } from './new-product/new-product.component'; import { NewVariantComponent } from './new-variant/new-variant.component'; import { AllItemsComponent } from './all-items/all-items.component'; import { AllVariantsComponent } from './all-variants/all-variants.component'; const routes: Routes = [ { path: 'new-item', component: NewProductComponent, data: { title: 'New Item' } }, { path: 'new-variant', component: NewVariantComponent, data: { title: 'New Variant' } }, { path: 'all-items', component: AllItemsComponent, data: { title: 'All Items' } }, { path: 'all-variants', component: AllVariantsComponent, data: { title: 'All Variants' } } ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class ProductRoutingModule {}