Questions tagged [zonejs]

Implements Zones for JavaScript

Links

127 questions
4
votes
2 answers

Angular debug context error Cannot read property ngDebugContext

I updated my version of angular from 2 to 4 and now I am getting this exception when executing a service: ERROR TypeError: Cannot read property 'ngDebugContext' of undefined at getDebugContext (core.es5.js:994) at isViewDebugError…
mruanova
  • 6,351
  • 6
  • 37
  • 55
4
votes
0 answers

How do you use ZoneJs in NodeJs?

I'm trying to setup a Zone in my NodeJs api using Express. I've got the following require... const Zone = require('zone.js/dist/zone-node.js'); and the following middleware function... function setupAuthZone(req, res, next) { return…
Tim Hardy
  • 1,654
  • 1
  • 17
  • 36
4
votes
1 answer

angular2 how do you render a timer Component inside `ngFor`

I want to render a visual countdown timer. I'm using this component, https://github.com/crisbeto/angular-svg-round-progressbar, which relies on SimpleChange to deliver changes.current.previousValue & changes.current.currentValue. Here is the…
michael
  • 4,377
  • 8
  • 47
  • 73
4
votes
0 answers

Angular 2 Observable dropping out of angular zone

Angular 2 application where most of the State of the application lives in @Injectable services that expose the state via an Observable. At some point the application is dropping out of the Angular Zone, which causes change detection to not work. …
Ryan Langton
  • 6,294
  • 15
  • 53
  • 103
4
votes
2 answers

using zone.js hooks in node

I'm trying to write a simple demo using angular/zone.js in node, but for some reason neither the beforeTask or afterTask are being called. Here is the code I'm running: require('zone.js'); function foo () { Zone.current.fork({ name:…
Matan Lieberman
  • 416
  • 3
  • 9
3
votes
1 answer

how to resolve the zone already loaded error in angular4?

Im trying to load my angular build from a typescript package using (dist/index.html). Its loading fine, but when im going back and again trying to load the same, its showing the below errors. VM5485:1 Uncaught Error: Zone already loaded. at new…
Ani2019
  • 125
  • 2
  • 9
3
votes
2 answers

In Angular a Promise with a finally()-Block does not reject properly

I have a problem in an angular 7 application. When I have a promise with a finally block, Errors are not thrown! They get swallowed without noticing, When I remove the finally-block it behaves like expected. Here are some examples: With vanillaJS…
Michael B
  • 1,660
  • 3
  • 28
  • 59
3
votes
2 answers

Getting SCRIPT5022: SecurityError in zone.js (192,25)

I'm getting SCRIPT5022: SecurityError in zone.js (192,25) intermittently when I load an Angular component in an iframe on IE11. Other than that the frame is working and I don't notice anything broken. This is the code around the error: …
sashoalm
  • 75,001
  • 122
  • 434
  • 781
3
votes
1 answer

Are there any alternatives to ngUpgrade for running angular and angularjs side-by-side, or a way to opt out of ngUpgrade's $digest triggers?

I have a rather large angular.js 1.6 app that I would like to migrate to Angular, but using ngUpgrade causes way too many $digests to be triggered (i.e. every time Zone.onMicrotaskEmpty is fired). Unfortunately the app I am migrating is already not…
David Deutsch
  • 17,443
  • 4
  • 47
  • 54
3
votes
2 answers

Slow performance in hybrid AngularJS and Angular application in Safari

I have started recently the migration of an AngularJS application to Angular 4 using the upgrade module. One of my AngularJS directives uses a third party library (ngFlow) to upload files using XMLHttpRequest.send(). When running in hybrid mode,…
Ivan
  • 1,477
  • 3
  • 18
  • 36
3
votes
0 answers

How come that NgZone solves this issue?

I'm creating an application where the user can identify himself via his Google account. Behind the scenes, I'm using gapi to handle the login. On the other hand, there is an angular service called "user" that has an Observable that is broadcasting…
ssougnez
  • 5,315
  • 11
  • 46
  • 79
3
votes
1 answer

Exclude websocket from zonejs

I am rewriting app based on angular 1 to angular 2. In my app there is websockets. Each time when app gets message from websocket it runs zone.runTask (because websocket.onmessage is async function) and in the end it update $digest circle from…
vorant
  • 708
  • 5
  • 15
3
votes
1 answer

How can I prevent Firebase from repeatedly triggering change detection in Angular 2?

Firebase uses a lot of internal asynchronous calls that trigger change detection because of Angular/Zone monkey-patching websockets and setInterval etc. Even when I'm not interacting with my app, I see a cascade of change detection happening all the…
3
votes
0 answers

Fix Angular2 CORS redirects with Zone

I was connecting my app with a REST API in which some operations return response redirects. So I got the error: "Redirects form [url] has been blocked by CORS policy. Request requires preflight, which is disallowed to follow cross-origin…
Serginho
  • 7,291
  • 2
  • 27
  • 52
3
votes
3 answers

Angular2, ZoneJS and externally changed DOM

I need some help concerning an externally changed DOM within an Angular2 RC1 web app. The scenario is simple: I do have a component with an according template that contains an empty div with an ID like this
The…
Jan B.
  • 6,030
  • 5
  • 32
  • 53
1 2
3
8 9