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
0 answers

Transpile async/await to Generator functions with tsc with target >= ES2017

I hardly try to transpile async/await patterns to generator functions for targets >= ES2017 with tsc. This seems to be possible with babel (@babel/plugin-proposal-async-generator-function or @babel/plugin-transform-async-to-generator), but I try to…
Dominic
  • 11
  • 4
1
vote
0 answers

Broken integration of authenticating users with Google account after angular/zone.js updated to 0.11.5

We have a Web application that allows usesr to log in with their Google accounts. Our application is written in Angular4 (latest build has 12.2.16 version). Recently we noticed that some users experience problems with Google login. After…
1
vote
1 answer

How to run async function outside ngZone?

I have tried to tun script outside current Zone: async ngAfterViewInit(): Promise { this.ngZone.runOutsideAngular(() => { await this.run(); }); } async run() { // TODO } I get this error: 'await' expressions are only…
user15423370
1
vote
1 answer

zone.js expected to be running in ProxyZone

I feel like this has been asked many times, but none of the solutions I find is helping and I'm a bit lost what is the cause of my issue. The solutions usually suggest that either the async/fakeAsync call was set in the wrong place (e.g. describe…
1
vote
0 answers

core.js?09c9:4002 ERROR RangeError: Maximum call stack size exceeded in zone.js / Angular CLI - 8.3.29 version

Migrating from Angular 7 to 8 version update. Getting this error, after navigating to form page. User can't able to access the form page. core.js?09c9:4002 ERROR RangeError: Maximum call stack size exceeded at ZoneDelegate.invoke…
Prasanth
  • 31
  • 2
1
vote
1 answer

Should Angular components and services always avoid using setInterval (or rxjs timer)?

I have some Components and Services that perform operations periodically in the background -- refreshing data, updating the displayed date/time, etc. I originally wrote these features using setInterval. Now, I'm going back to add unit tests. I…
Coderer
  • 25,844
  • 28
  • 99
  • 154
1
vote
0 answers

Can I remove zone.js package or whatever it is from a angular/nativescript PWA project and not break the project

I was wondering if it is possible to exclude the zone.js dependency from nativescript/angular pwa app.
Ezima Ugwu
  • 31
  • 1
  • 3
1
vote
1 answer

Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten. with polyfills correct

I have update my application from angular 8 to 9, after update the packages, i have complied the application successfully. But in the browser Chrome console. It has the error message: Error: Zone.js has detected that ZoneAwarePromise…
congyi shi
  • 11
  • 1
1
vote
0 answers

How to cancel the macroTask and microTask in zone.js?

I want to do some asynchronous work by using zone.js. Mostly it will be zone.js microTask. When I got the desired output, I wish to cancel all the running and scheduled tasks. I am a bit confused about where to cancel the tasks. Here my code…
Gokulakannan T
  • 586
  • 4
  • 14
1
vote
1 answer

Angular / Zone.js : intercept non-angular XMLHttpRequest-s properly?

I am developing an app that needs to include the Tencent Captcha. Contrary to Google's, it is not well documented and drove me to some confusion that made me reverse-engineer its obfuscated code. For a seamless implementation, I need to get a…
Charaf
  • 324
  • 3
  • 18
1
vote
2 answers

Does zone.js have something to do with css not rendering?

I have a print preview CSS and it is all working in my current location. I've tested it in different browsers and computers and they're all working fine. But when viewed in Japan location, CSS doesn't work specifically on the . Warnings were…
Char
  • 2,073
  • 8
  • 28
  • 45
1
vote
0 answers

runOutsideAngular not working with more number of dom elements

I have been working on angular 5 from the last few months now. And I wanted to implement draggable functionality. I have written my code in this link https://stackblitz.com/edit/angular-issue-repro2-hvzjos I am trying to use runOutsideAngular which…
1
vote
2 answers

Angular Elements bug when using in Angular6 app

I'm facing a strange behavior using Angular Elements to build a widget. I have created a widget to pop-up a simple feedback form on another site, build with Angular too, and work pretty well in development, but when I build the application for…
1
vote
2 answers

How to detect missing tick() in fakeAsync()

I wrote this test for my Angular app: it('should request confirmation before deleting & abort action if user declined', fakeAsync(() => { spyOn(appService, 'confirm').and.returnValue(of(false)); spyOn(personService,…
fishbone
  • 3,140
  • 2
  • 37
  • 50
1
vote
1 answer

Need to click twice to trigger (click) event

I am having an issue that under a specific scenario, I need to click twice in order to trigger the (click) event on a DIV in my Angualar 6 component. I realize that it would probably be more helpful to provide some example code. But the number of…
khpremier
  • 83
  • 1
  • 2
  • 8