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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(router): runs guards every time when unsuccessfully navigating to… #13209

Merged
merged 1 commit into from Dec 2, 2016

Conversation

vsavkin
Copy link
Contributor

@vsavkin vsavkin commented Dec 2, 2016

Closes #12851

@@ -387,8 +387,17 @@ export class Router {
// which does not work properly with zone.js in IE and Safari
this.locationSubscription = <any>this.location.subscribe(Zone.current.wrap((change: any) => {
const rawUrlTree = this.urlSerializer.parse(change['url']);
const lastNavigation = this.navigations.value;

// TODO add a comment describing why it has to be like that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO ?

@vsavkin vsavkin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Dec 2, 2016
extras: NavigationExtras,
resolve: any,
reject: any,
promise: Promise<boolean>
imperative: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also never remember if it should be ,/; in types but here you have ""/,/;, must be wrong

@vsavkin vsavkin force-pushed the router_guard_called_only_once branch from eebaba0 to 2438965 Compare December 2, 2016 22:32
@vicb vicb added action: merge The PR is ready for merge by the caretaker pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 2, 2016
@alxhub alxhub merged commit d46b8de into angular:master Dec 2, 2016
maxime-allex pushed a commit to Linkurious/angular that referenced this pull request Dec 6, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Router 3.2.0 - canDeactivate runs only once
4 participants