Skip to content

Not possible to use Angular without Zone because of Router.setUpLocationChangeListener #20582

@ArekSliwa

Description

@ArekSliwa

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report  
[ ] 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

Current behavior

When using Angular Router it's not possible to use new Angular 5 feature ngZone: 'noop' .
In the console we can see: Zone is not defined error.
Router method setUpLocationChangeListener is using Zone.
screenshots:
zone is not defined
Router.setUpLocationChangeListener method implementation

Expected behavior

Angular Router is able to work without Zone.

Minimal reproduction of the problem with instructions

  1. Just fire angular app with
    platformBrowserDynamic()
    .bootstrapModule(AppModule, {
    ngZone: 'noop'
    });
  2. comment import 'zone.js/dist/zone'; in polyfills
  3. Try to use angular Router in some easy case.

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

Environment


Angular version: 5.0.1



Browser:
- [x ] 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