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

Router not triggering canDeactivate guard when navigating away from aux route #11345

Closed
epohknarf opened this issue Sep 5, 2016 · 2 comments
Closed

Comments

@epohknarf
Copy link

epohknarf commented Sep 5, 2016

I'm submitting a ...

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
When I navigate away from an aux route with this code:
this._router.navigate([{ outlets: { panel: null } }]);
I get routed correctly, but the guard CanDeactivate set on aux route does not get triggered.

Expected/desired behavior
I expect the guard to be triggered

Reproduction of the problem
See a demo here: http://embed.plnkr.co/jxXHrg/

What is the expected behavior?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 2.0.0-rc.6
  • Router version: 3.0.0-rc.2
  • Browser: [Chrome 52.0.2743.116 m (64-bit)]
  • Language: [TypeScript 2.0.0]
@verenion
Copy link

We are also seeing the exact same issue on the ng2 release. We are routing in an almost identical manner to the example above, but the Guard does not get triggered.

@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.
Projects
None yet
Development

No branches or pull requests

4 participants