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
3
votes
2 answers

Angular zone.js - zone-evergreen.js error : t.getElementsByTagName is not a function

I have an app on Angular 11 that just started getting errors (around an hour ago, without any update or anything) on all browsers, all environments (local / staging / prod) at the same time: Uncaught TypeError: t.getElementsByTagName is not a…
Yoh
  • 316
  • 3
  • 9
3
votes
1 answer

zone.js cannot be resolved

After upgrading to the latest Angular cli, when I run ng serve, I get the following error: ./node_modules/@angular-devkit/build-angular/src/webpack/es5-polyfills.js:106:0-37 - Error: Module not found: Error: Can't resolve…
Reem Al-Assaf
  • 734
  • 6
  • 19
3
votes
1 answer

Typeform in Ionic App causes zone.js failure

I have an Ionic app (runs Angular 4) and in one view I'd like to embed a typeform using the typeform embed sdk. For some reason adding the following code results in a zone error: Error: Zone.js has detected that ZoneAwarePromise…
Jeremy Thomas
  • 6,240
  • 9
  • 47
  • 92
3
votes
0 answers

How does typescript/angular import zone.js for testing

In test.ts of John Papa's Angular Tour of Heroes demo project, there are the following imports: import 'zone.js/dist/long-stack-trace-zone'; import 'zone.js/dist/proxy.js'; import 'zone.js/dist/sync-test'; import 'zone.js/dist/jasmine-patch'; import…
Dan Schnau
  • 1,505
  • 14
  • 17
3
votes
1 answer

remote options loading in select using ng2-semantic-ui not working

public optionsLookup(query:string, initial:any): Promise { return new Promise ( (resolve, reject) => /*[{ id: 1, name: 'ololo1'}, { id: 2, name: 'ololo2'}]*/ this.apiService.get('private/countries', query) …
2
votes
0 answers

Detect if a zone.js patch is loaded?

Hi I need to find a way to detect that an app imports zone-patch-fetch. It's imported like following : import 'zone.js/plugins/zone-patch-fetch'; Is there a way to do that ?. Stackblitz demo
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
2
votes
0 answers

How to use GSAP with angular and not effects the performance

I need to use GSAP (Green Socks Animation) with angular application and not to affect the application performance or change the life cycle. Still, in the other hand, I need it to start on the component init or on scroll-triggered. So, how can I do…
2
votes
2 answers

Error: In this configuration Angular requires Zone.js in Angular app in IE11

Im using angular 9 application, on-load of the app Im getting this error in IE11. Error: In this configuration Angular requires Zone.js. And Component doesn't load and shows the above error in console. I tried adding import 'zone.js'. But it didn't…
Sanjay sahaj
  • 29
  • 1
  • 2
2
votes
0 answers

Angular decides to jump outside of it's zone when http client request is finished. Why?

I have something like this: public async getTheThing() { ..... console.log(`getTheThing a: ${NgZone.isInAngularZone()}`); const response = await this.http.get(url, {headers: headerDict}).toPromise(); …
gyozo kudor
  • 6,284
  • 10
  • 53
  • 80
2
votes
0 answers

Angular 9 testing error: Zone is needed for the async() test helper but could not be found

As above, trying to test but getting the error Zone is needed for the async() test helper but could not be found I also get An error was thrown in afterAll Uncaught TypeError: require.context is not a function TypeError:…
ed4becky
  • 1,488
  • 1
  • 17
  • 54
2
votes
2 answers

Upgraded from angular 5 to angular 8, issues with SystemJS

I have an app made in ASP.Net MVC with Angular 5 inside to display the views. I updated Angular from 5 to 8 and now I am having a big trouble to make it work because this error: error image It seems something about SystemJS or Zone.js I also have…
SMGG
  • 53
  • 5
2
votes
1 answer

2019s way of accessing navigator.mediaDevices.getUserMedia()

I am currently developing an angular7-app, created it the standard way through CLI and started coding. Now I would like to record some audio which is no difficult thing in modern browsers. I am using the built-in browser functionalities of…
Nico
  • 336
  • 3
  • 19
2
votes
1 answer

Angular Elements / Zone.js event listeners slow down homepage

We have an Angular 7 project that generates a Custom Element with Angular Elements. This Custom Element is used in a React project and in an AngularJS project. When the code of the Custom Element is loaded in one of these projects, the site is…
user1916076
  • 145
  • 1
  • 16
2
votes
1 answer

Angular reverse engineering: Go back to component from listener (devTools > Elements > Event listeners) through Zone.js

I'm working on an angular (7.x) app running in dev mode. Starting from browser (chrome in my case) devTools > Elements > Event listeners, is there a way to "easily" retrieve which angular component set the listener (inside template (click)=call() or…
bertrandg
  • 3,147
  • 2
  • 27
  • 35
2
votes
0 answers

Find error when error message doesn't show location

I'm building an app using Ionic, Angular, and Firebase. I'm having a problem where the code is being built and packaged by webpack and it returns an error from polyfills.js, which is not useful in the slightest... The error message looks like this:…
Simon
  • 2,498
  • 3
  • 34
  • 77
1 2
3
9 10