Skip to content

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

@epohknarf

Description

@epohknarf

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions