-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
ActivatedRoute is wrong after rejecting a CanDeactivate #12776
Comments
Pls add a repro in plunkr. |
link added in original post |
vsavkin
added a commit
to vsavkin/angular
that referenced
this issue
Nov 14, 2016
vsavkin
added a commit
to vsavkin/angular
that referenced
this issue
Nov 15, 2016
petebacondarwin
pushed a commit
to petebacondarwin/angular
that referenced
this issue
Nov 16, 2016
chuckjaz
pushed a commit
that referenced
this issue
Nov 17, 2016
alexeagle
pushed a commit
to alexeagle/angular
that referenced
this issue
Nov 17, 2016
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.
I'm submitting a ... (check one with "x")
Current behavior
Given a navigation using 'router.navigate(...)' from an activated route for which a CanDeactivate routeguard is defined.
And when the CanDeactivate guard returns a Promise which is resolved with false (i.e. the route can not be deactivated)
Then the ActivatedRoute.firstChild injectable of the parent route points to the route that was navigated to, rather than the route that could not be deactivated.
Expected behavior
It would be better to only update the ActivatedRoute when the current route can be deactivated, and remain to be the current route if any CanDeactivate route guards fail.
Minimal reproduction of the problem with instructions
http://plnkr.co/edit/pLf5VTvq3Lh0H2N5g1Tl?p=preview
What is the motivation / use case for changing the behavior?
I feel the current value of the ActivatedRoute can not be
Please tell us about your environment:
MacOS, Webstorm, webpack,...
Angular version: 2.0.X
Angular 2.1.1
Router 3.1.2
Browser:
all
Language:
all
Node (for AoT issues):
node --version
= v6.2.1The text was updated successfully, but these errors were encountered: