Closed krazy-hotdog closed 3 years ago
By the way i am using it as children in routing module
@krazy-hotdog If possible please provide reproducible stackblitz demo link.
Hi, I just added a new component (HeyComponent) in your sample and make it the parent. Instead of putting the "app-ng-dynamic-breadcrumb element" in my app.component.html, I put it in my hey.component.html.
Here is my app-routing.module.ts
#######################################
const routes: Routes = [ {path : 'hey', component : HeyComponent, children : [
{
path: 'page1/:pageOneID',
component: PageComponent,
data: {
title: 'page1',
breadcrumb: [
{
label: 'Page1',
url: '',
}
]
},
},
{
path: 'page1/:pageOneID/page2/:pageTwoID',
component: Page2Component,
data: {
title: 'page2',
breadcrumb: [
{
label: 'page1',
url: 'page1/:pageOneID'
},
{
label: 'page2',
url: ''
}
]
},
},
{
path: 'page1/:pageOneID/page2/:pageTwoID/page3/:pageThreeID',
component: Page3Component,
data: {
title: 'page3',
breadcrumb: [
{
label: 'page {{pageOneID}}',
url: 'page1/:pageOneID'
},
{
label: 'page {{pageTwoID}}',
url: 'page1/:pageOneID/page2/:pageTwoID'
},
{
label: 'page {{customText}}',
url: ''
}
]
},
},
{
path: '', pathMatch: 'full', redirectTo: '/hey/page1/1'
}
]
}
]
+1, I'm also facing the same issue. Breadcrumbs are missing once I refresh the app.
Same here for Angular universal SSR NG8 version
+1
is this resolved ?
Hi,
It's my first time to use this module and I'm also new to Angular. It's working fine it's just that, when I refresh the page all the routes displayed in the breadcrumb disappears. What's left is just a blank component. This also happens when i first navigate to the first level, it will only shows the breadcrumbs content when I route to the second level and go back to the first level.
Thanks.