-
Notifications
You must be signed in to change notification settings - Fork 26.2k
routerLink does not use state-input on doubleclick #29590
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
Comments
Might be a duplicate of #29389 |
jasonaden
added a commit
to jasonaden/angular
that referenced
this issue
Apr 1, 2019
…n cancels an existing one Prior to this change, if a navigation was ongoing and a new one came in, the router could get into a state where `router.currentNavigation` was `null` even though a navigation was executing. This change moves where we set the `currentNavigation` value so it's inside a `switchMap`. This solves the problem because the `finally` on the `switchMap` had been setting `currentNavigation` to `null` but the new `currentNavigation` value would have already been set. Essentially this was a timing problem and is resolved with this change. Fixes angular#29389 angular#29590
Thanks for the issue. Looks like a duplicate of #29389, so please look there for updates. |
jasonaden
added a commit
to jasonaden/angular
that referenced
this issue
Apr 1, 2019
…n cancels an existing one Prior to this change, if a navigation was ongoing and a new one came in, the router could get into a state where `router.currentNavigation` was `null` even though a navigation was executing. This change moves where we set the `currentNavigation` value so it's inside a `switchMap`. This solves the problem because the `finally` on the `switchMap` had been setting `currentNavigation` to `null` but the new `currentNavigation` value would have already been set. Essentially this was a timing problem and is resolved with this change. Fixes angular#29389 angular#29590
jasonaden
added a commit
that referenced
this issue
Apr 1, 2019
…n cancels an existing one (#29636) Prior to this change, if a navigation was ongoing and a new one came in, the router could get into a state where `router.currentNavigation` was `null` even though a navigation was executing. This change moves where we set the `currentNavigation` value so it's inside a `switchMap`. This solves the problem because the `finally` on the `switchMap` had been setting `currentNavigation` to `null` but the new `currentNavigation` value would have already been set. Essentially this was a timing problem and is resolved with this change. Fixes #29389 #29590 PR Close #29636
jasonaden
added a commit
that referenced
this issue
Apr 1, 2019
…n cancels an existing one (#29636) Prior to this change, if a navigation was ongoing and a new one came in, the router could get into a state where `router.currentNavigation` was `null` even though a navigation was executing. This change moves where we set the `currentNavigation` value so it's inside a `switchMap`. This solves the problem because the `finally` on the `switchMap` had been setting `currentNavigation` to `null` but the new `currentNavigation` value would have already been set. Essentially this was a timing problem and is resolved with this change. Fixes #29389 #29590 PR Close #29636
wKoza
pushed a commit
to wKoza/angular
that referenced
this issue
Apr 17, 2019
…n cancels an existing one (angular#29636) Prior to this change, if a navigation was ongoing and a new one came in, the router could get into a state where `router.currentNavigation` was `null` even though a navigation was executing. This change moves where we set the `currentNavigation` value so it's inside a `switchMap`. This solves the problem because the `finally` on the `switchMap` had been setting `currentNavigation` to `null` but the new `currentNavigation` value would have already been set. Essentially this was a timing problem and is resolved with this change. Fixes angular#29389 angular#29590 PR Close angular#29636
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐞 bug report
Affected Package
@angular/router
Is this a regression?
I can't tell if it worked in a previous version.
Description
Hello,
I have a application, where I transfer some data through the routerLinks state-input.
At the NavigationEnd event or with the router.lastSuccessfulNavigation I extract the extras and read out the state.
This works fine when clicking on a link one time. If you click more then one time (e.g. doubleclick) the state will be ignored.
Take a look at the stackblitz, I hope this will make clear whats the problem.
🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-jabnva?file=src%2Fapp%2Fapp.component.ts
🔥 Exception or Error
there is no exception
🌍 Your Environment
Angular Version:
Anything else relevant?
Tested in Chrome 73
The text was updated successfully, but these errors were encountered: