Questions tagged [zone.js]

A Zone is an execution context that persists across async tasks. You can think of it as thread-local storage for JavaScript VMs.

Zone API is inspired by Dart and is developed along with Angular2.

https://github.com/angular/zone.js/

148 questions
1
vote
1 answer

After Angular 6 Update this._zone.onMicrotaskEmpty undefined

after updating application to angular 6 I get errors during test execution TypeError: Cannot read property 'subscribe' of undefined at new ApplicationRef node_modules/@angular/core/fesm5/core.js:4322:1) at _createClass…
1
vote
0 answers

Zone.js in Angular 6

I created an application with jhipster. It is working but when I make a request to backend side I get 401(Unauthorized) error with zone.js. I think my code is working but I think that I have a general error. I made some researches about zone.js but…
user9709162
1
vote
3 answers

zone.run() on Observable.bindCallback()

I am using Electron, and as you may know, all of Electron's calls run outside of Angular's zone. So you need to call zone.run() at some point when using Electron methods. A typical Electron call looks like this (Notice the zone.run()): …
Dolan
  • 1,519
  • 4
  • 16
  • 36
1
vote
1 answer

Karma test failing due to Zone.js TypeError: Cannot read property 'takeUntil' of undefined

Experiencing (TypeError: Cannot read property 'takeUntil' of undefined) running this test. This is related to Zone.js. The component is behaving fine in the app, just the test is failing? Some more details to keep you happy This is the component I…
1
vote
1 answer

XHR error (404) loading https://unpkg.com/rxjs@5.4.3/operators/index.js/first.js

I am trying to make use of google material input control in angular2 but I keep getting the below error in browser console. : I've checked my 'node_modules' folder and I see it does contain 'rxjs' folder but there is only 'operator' folder and not…
virtualsante
  • 203
  • 1
  • 10
1
vote
0 answers

Angular 4 codemirror performance issue (detaching zone)

I've run into big performance problem when I tried to implement codemirror, firstly I used ng2-codemirror but it's killed my application which has only list of scripts and codemirror component. I found out that creating instance (by instance i mean…
Patryk Brejdak
  • 1,571
  • 14
  • 26
1
vote
2 answers

Unhandled Promise rejection: `(window|global).Promise` has been overwritten

My polyfills.ts file contains: import 'core-js/es6'; import 'core-js/es7/reflect'; require('zone.js/dist/zone'); Now I am frequently (but not always) getting thiserror: Unhandled Promise rejection: Zone.js has detected that ZoneAwarePromise…
anand kumar
  • 69
  • 2
  • 5
1
vote
1 answer

Use zone.js inside node (not angular)

I would like to use zone.js in my node app. Although I have found a post in which is described how to do this, I still get zone is not defined error For example. I also found an examples likt this let zone = require('zone'); zone.run(function () { …
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
1
vote
1 answer

Is zone.js for Angular, what is the virtual DOM for React?

Pascal Precht wrote a great article on change detection in Angular. While I understand that zone.js and virtual DOM are completely different concepts, is zone.js for Angular the equivalent of virtual DOM for React? If yes, what are the main…
Kostas Siabanis
  • 2,989
  • 2
  • 20
  • 22
1
vote
3 answers

Issue with zone.js and non angular dom element events

I'm facing an issue with Zone.js and non-angular DOM element events. This happens when we assign a javascript function to any DOM element in the HTML mark up and then programmatically re-assign the same DOM element some other or the same function. …
Bhavik Shah
  • 358
  • 4
  • 11
1
vote
2 answers

ZoneAwarePromise overwritten when adding Handsontable to Angular-CLI scripts

I'd like to add the Handsontable library to my Angular project. Using angular-cli, I added Handsontable to the scripts section of .angular-cli.json: "scripts": [ "../node_modules/handsontable-pro/dist/handsontable.full.js" ] Webpack compiles…
tilo
  • 14,009
  • 6
  • 68
  • 85
1
vote
0 answers

How do I suppress http error responses in Angular 4

I've created a service for processing a user login (by hitting a backend server which responds with a JWT on successful authentication). login(username: string, password: string): Observable { const headers = new Headers({ …
P1xt
  • 324
  • 1
  • 11
1
vote
2 answers

How to debug zone.js exception?

I have a Angular 2 TypeScript project. I have updated all of the packages and built the project. Now I see this error in the console: zone.js:1265 Uncaught TypeError: Cannot read property 'apply' of undefined at XMLHttpRequest.desc.get [as…
Anton Pavelyev
  • 469
  • 4
  • 20
1
vote
0 answers

angular2 zone.js http error

I am using angular2 and I make up an http request, in case of error I catch the error and throw them as an observable. But I can still see that zone.js error as follows: POST http://localhost:8000/users 500 (Internal Server Error) I can see the…
Adam
  • 515
  • 1
  • 5
  • 15
1
vote
1 answer

Zone.js passes wrong currentZone value to onInvoke hook

there. According to the comments for ZoneSpec interface (located in zone.ts file), onInvoke hook has to receive currentZone as second parameter. And if I create interceptor zone, then reference to that zone should be passed as second parameter. Here…
davidoff
  • 2,175
  • 3
  • 16
  • 23