Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since 6.8.0, breadcrumb disappears on page refresh #108

Closed
fgoulet opened this issue Dec 15, 2021 · 14 comments 路 Fixed by #115
Closed

Since 6.8.0, breadcrumb disappears on page refresh #108

fgoulet opened this issue Dec 15, 2021 · 14 comments 路 Fixed by #115
Labels
bug Something isn't working no-issue-activity wontfix This will not be worked on

Comments

@fgoulet
Copy link

fgoulet commented Dec 15, 2021

馃悶 Bug report

Description

It was working fine by injecting BreadcrumbService in the constructor of the page until I upgraded from 6.7.0 to 6.8.0

馃敩 Minimal Reproduction

Add a breadcrumb in the page, hit F5 to refresh the page.

馃捇Your Environment

Windows 10

Angular Version:
12.1

@fgoulet fgoulet added the bug Something isn't working label Dec 15, 2021
@github-actions
Copy link

Hello 馃憢 @fgoulet
Thank you for raising an issue. We will investigate into the issue and get back to you as soon as possible. Please make sure you have given us as much context as possible.
Feel free to raise a PR if you can fix the issue. Check the local development guide

@udayvunnam
Copy link
Owner

udayvunnam commented Dec 19, 2021

@fgoulet It worked fine with a demo app. Can you please provide a reproducible example to check the issue? Use https://stackblitz.com/edit/angular-xng-breadcrumbs as reference

@fgoulet
Copy link
Author

fgoulet commented Dec 20, 2021

Hi @udayvunnam ,
I think I found why it does not work in our project. We use msal angular to handle authentication and, for some reasons, they set initialNavigation to enabledBlocking in the Router module configuration.

It was working fine until version 6.8.0. From 6.8.0 and up, if I set initialNavigation to enabledNonBlocking (the default), everything works again. But I'm not sure on the impact of this on msal angular.

Here's a repro. The breadcrumb does not appears when page load, but only when you click "change route".
https://stackblitz.com/edit/angular-xng-breadcrumbs-fku85f?file=src/app/app.routing.module.ts

@udayvunnam
Copy link
Owner

Hi @udayvunnam , I think I found why it does not work in our project. We use msal angular to handle authentication and, for some reasons, they set initialNavigation to enabledBlocking in the Router module configuration.

It was working fine until version 6.8.0. From 6.8.0 and up, if I set initialNavigation to enabledNonBlocking (the default), everything works again. But I'm not sure on the impact of this on msal angular.

Here's a repro. The breadcrumb does not appears when page load, but only when you click "change route". stackblitz.com/edit/angular-xng-breadcrumbs-fku85f?file=src/app/app.routing.module.ts

Thanks, @fgoulet for identifying the issue. I have made a fix to this in [email protected]. Do let me know if you still face this issue.

@fgoulet
Copy link
Author

fgoulet commented Jan 6, 2022

Hi @udayvunnam , unfortunately, the issue is still present in 7.1.1. When I set intialNavigation to enabledBlocking, I loose the breadcrumb on page refresh.

@iamjustanotherrandom
Copy link

Same for me, the issue is still present in latest version

@udayvunnam udayvunnam reopened this Feb 2, 2022
@stale
Copy link

stale bot commented Jun 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 10, 2022
@iSpid3r
Copy link

iSpid3r commented Jun 29, 2022

The issue is still relevant.

xng-breadcrumb: 8.0.2
angular: 14.0.3

The "initialNavigation" parameter is needed for Server-Side Rendering, but the breadcrumbs do not work correctly with it.

@stale stale bot removed the wontfix This will not be worked on label Jun 29, 2022
@IlyaSurmay
Copy link

same here
xng-breadcrumb: 8.0.2
angular: 14.0.3

@marcelbarner
Copy link

marcelbarner commented Aug 29, 2022

I added the BreadcrumbService as constructor paramter of my AppModule and it worked. So I think the problem is that the service is initialized to late.

https://stackblitz.com/edit/angular-xng-breadcrumbs-xkivgs?file=src%2Fapp%2Fapp.routing.module.ts

xng-breadcrumb: 6.8.3
angular 12.2.16

@stale
Copy link

stale bot commented Dec 31, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 31, 2022
@stale stale bot closed this as completed May 3, 2023
@udayvunnam udayvunnam reopened this May 27, 2023
@stale stale bot removed the wontfix This will not be worked on label May 27, 2023
@HammadKhaan
Copy link

I added the BreadcrumbService as constructor paramter of my AppModule and it worked. So I think the problem is that the service is initialized to late.

https://stackblitz.com/edit/angular-xng-breadcrumbs-xkivgs?file=src%2Fapp%2Fapp.routing.module.ts

xng-breadcrumb: 6.8.3 angular 12.2.16

This works perfectly fine for me. Thanks :)

Copy link

stale bot commented Mar 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Mar 13, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants