From ff6dc16aca559921087637afefcf185dcdb46c94 Mon Sep 17 00:00:00 2001 From: Vladimir Sinyavsky Date: Thu, 27 Sep 2018 18:47:18 +0300 Subject: [PATCH] [*] StoreRoutingModule : added breadcrumb keys --- .../ClientApp/src/app/store/store.routing.ts | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/LegendaryStore/ClientApp/src/app/store/store.routing.ts b/LegendaryStore/ClientApp/src/app/store/store.routing.ts index b25db2e..e6b986b 100644 --- a/LegendaryStore/ClientApp/src/app/store/store.routing.ts +++ b/LegendaryStore/ClientApp/src/app/store/store.routing.ts @@ -34,31 +34,28 @@ const routes: Routes = [ { path: ':categoryId', resolve: { category: CategoryResolver }, + data: { breadcrumb: { key: 'category', values: ['name'] } }, children: [ { path: '', component: ProductsListComponent }, { - path: 'products', + path: 'products/create', + component: ProductCreateComponent + }, + { + path: 'products/:id', + resolve: { product: ProductResolver }, + data: { breadcrumb: { key: 'product', values: ['product.name'] } }, children: [ { - path: 'create', - component: ProductCreateComponent + path: '', + component: ProductDetailsComponent }, { - path: ':id', - resolve: { product: ProductResolver }, - children: [ - { - path: '', - component: ProductDetailsComponent - }, - { - path: 'edit', - component: ProductEditComponent - } - ] + path: 'edit', + component: ProductEditComponent } ] }