Skip to content

feature(router): warn if navigation triggered outside Angular zone #24728

@trotyl

Description

@trotyl

I'm submitting a...

 [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report [ ] Performance issue [x] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question [ ] Other... Please describe: 

Current behavior

When some user performs navigation outside the Angular zone, the change detection will not be invoked.

Even it's certainly users' fault, they may still going to be confused by what the problem is:

Expected behavior

As the navigation should always happen in Angular zone, so router itself could guard against that thus produce a warning when not valid.

Minimal reproduction of the problem with instructions

N/A.

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

Reduce the invalid issue amounts.

Environment

 Angular version: X.Y.Z Browser: - [ ] Chrome (desktop) version XX - [ ] Chrome (Android) version XX - [ ] Chrome (iOS) version XX - [ ] Firefox version XX - [ ] Safari (desktop) version XX - [ ] Safari (iOS) version XX - [ ] IE version XX - [ ] Edge version XX For Tooling issues: - Node version: XX - Platform: Others: 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions