-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Second navigation in same app is always ignored #529
Comments
Is this happening only for your app1 ? Have you setup emptyroutecomponent in your angular applications? |
It seems to be pretty consistent, when navigation occurs within the active app. EmptyRouteComponent is correctly setup. |
Can you share your layout.html in the root-config file that you have created for the configuring the routes. |
I have created a repo to reproduce this issue, thanks to @kfrederix for the base repo. Screen.Recording.2024-11-26.210344.mp4https://github.com/sandeep-dxc/single-spa-angular-esm
@joeldenning @arturovt Would you have any suggestions on how to resolve this. Thanks. |
Hi Sandeep, Let me check that and get back to you. |
Hello @sandeep-dxc , I took a look at your repo => you can solve this issue by setting start({ urlRerouteOnly: false }); (I will add that also on my repo, because it's usually recommended to do that for Angular applications) |
Thanks @kfrederix, its working now 👍 |
Demonstration
I have a single-spa setup with a
nav-app
,app1
andapp2
. When i click a link forapp1
in mynav-app
, and then another link for another component inapp1
fromnav-app
the navigation is ignored. This happens consitently, and only for the second navigation.It seems to be releated to #113 as i can see that upon mounting
app1
the first time,replaceState
in extra-provider.ts is called, setting the flagskipNextPopState
, which then causes the second navigation event to be ignored.I'm unsure if the fix is needed with newer versions of single-spa, or the root cause has been fixed. I have not had any problems in commenting out the line setting the flag.
Expected Behavior
Navigation occurs
Actual Behavior
Navigation is ignored.
The text was updated successfully, but these errors were encountered: