emilol / angular-crumbs

Angular Breadcrumb
https://emilol.github.io/angular-crumbs
MIT License
46 stars 46 forks source link

Is there is an issue with Lazy Loading, as it doesn't work with me #19

Open ahmedsaidzahran opened 4 years ago

ahmedsaidzahran commented 4 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: XX  
- Platform:  

Others:

emilol commented 4 years ago

Can you reproduce your issue in something like stackblitz?

FriesBureau commented 4 years ago

I can't make the path show in breadcrumbs with Lazy Loaded in this template: https://github.com/tomastrajan/angular-ngrx-material-starter

Please advise how to implement a full breadcrumb path in lazy loaded routes.

Here is the path I cant get to be shown:

const routes: Routes = [ { path: '', component: ExamplesComponent, data: { breadcrumb: 'Examples' }, children: [ { path: '', redirectTo: 'todos', pathMatch: 'full' }, { path: 'todos', component: TodosContainerComponent, data: { title: 'anms.examples.menu.todos', breadcrumb: 'Todos' } }, { path: 'stock-market', component: StockMarketContainerComponent, data: { title: 'anms.examples.menu.stocks' } }, { path: 'theming', component: ParentComponent, data: { title: 'anms.examples.menu.theming' } }, { path: 'crud', redirectTo: 'crud/', pathMatch: 'full' }, { path: 'crud/:id', component: CrudComponent, data: { title: 'anms.examples.menu.crud' } }, { path: 'simple-state-management', component: UserComponent, data: { title: 'anms.examples.menu.simple-state-management' } }, { path: 'form', component: FormComponent, data: { title: 'anms.examples.menu.form' } }, { path: 'notifications', component: NotificationsComponent, data: { title: 'anms.examples.menu.notifications' } }, { path: 'elements', component: ElementsComponent, data: { title: 'anms.examples.menu.elements' } }, { path: 'authenticated', component: AuthenticatedComponent, canActivate: [AuthGuardService], data: { title: 'anms.examples.menu.auth' } } ] } ];

kinizumi commented 4 years ago

I can't make the path show in breadcrumbs with Lazy Loaded too