-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng2-breadcrumb use with child route in angular 4 and angular material #74
Comments
Hi I think I might have a similar issue with child routes. Since upgrading to Angular 4, the bread crumbs don't always work. If I navigate to http://localhost/abc the breadcrumbs don't show up. But If I then go to http://localhost/abc/def the breadcrumbs do show up. I can then use the breadcrumbs to get back to http://localhost/abc and they will show correctly on that page. I haven't found a solution to this yet. |
I was able to diagnose my problem, and found that the following fix worked for me: |
I get this exact behaviour when using child routes in a shared module - the initial load of any page shows a blank breadcrumb, but any subsequent navigation then shows them up as expected. |
Just like @nitramau I was able to fix this by adding this.generateBreadcrumbTrail(this.router.url); in breadcrumb.ts, at the end of ngOnInit(). Any idea when this will be fixed? |
when added It works fine when I use: |
Adding |
Hi,
I'm using ng2-breadcrumb in my angular 4 project with angular material. I configure the children route for some feature modules. The breadcrumb works but there's one issue when I'm in a child route, e.x
http://myapp/material/cards
When I reload the page at url http://myapp/material/cards the breadcrumb does not render correctly it render as if I'm at the root url.
Does anyone having this same issue?
Thank you
The text was updated successfully, but these errors were encountered: