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
0
votes
1 answer

blackboxed zone.js in developer tools but still its going into zone.js

I am new to Angular. I was debugging below scores method. when I step over in developer tools the encoded: true of scores() its going into zone.js. I blackboxed zone.js but still its going into zone.js and pointing to this line…
user9046912
0
votes
1 answer

How to import and use zone.js in Angular 2+ and ES2015 Modules

How can I work with pure zone.js API (like Zone.current or creating new zones by forking) in Angular 2+ & ES2015 Modules? When I do: import { Zone } from 'zone.js'; I get this error: file: 'file:///c%3A/Users/InTheZone/src/main.ts' severity:…
dragonfly
  • 17,407
  • 30
  • 110
  • 219
0
votes
0 answers

zone.js:140 Uncaught TypeError: Cannot read property 'element' of undefined

I am trying to learn js.When I execute the below code for first time I am not seeing any error.When I execute second time I am getting the below error. Uncaught TypeError: Cannot read property 'element' of undefined Error is pointing to this…
user9046912
0
votes
1 answer

How to use Bluebird promises with Angular 5?

Here's a link to the Plunker I have a project within which the native Promise implementation is replaced with that of Bluebird. It is my understanding that in order to successfully use Angular 5 in this scenario, Bluebird must be patched in order to…
tambler
  • 3,009
  • 2
  • 23
  • 26
0
votes
0 answers

Top level Function calls in Chrome Flame charts

I'm looking at a flame chart of my Angular application. I understand most of it, there are top level XHRs, SetTimeouts,Parse, GC, Script evaluation etc. But there are a few top level 'Function calls', (They seem to be coming from Zone.JS…
gawicks
  • 1,894
  • 15
  • 22
0
votes
3 answers

ngZone or zone.js: the place of monkey-patching?

I'm learning how ngZone works in Angular. I understood that it's doing monkey-patching of standard async operations(such as setTimeout). But who is doing monkey-patching? zone.js library or Angular itself within ngZone? It would be great if you…
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
0
votes
0 answers

state transition error in internet explorer

We are developing a web app with angular 2.4.9. On the start site we have a button with a link to the login page:
qud
  • 1
  • 1
0
votes
1 answer

Forcing Zone/Digest on a pipe with static falsy

In my angular 4 template I have a simple pipe with a boolean I toggle to check if a user has been created
above my data I have my ng-repeat counts like this : Total…
SD Dev
  • 335
  • 3
  • 10
0
votes
1 answer

angular 4, zone.js and a custom event of a javascript library

I included cropper.js in my angular 4 project. in the component I use cropper.js I registered its ready event like so: this.cropperOptions = { // omitted options which are not importent cropend: () => { this.changedOrTouched(); …
Arikael
  • 1,989
  • 1
  • 23
  • 60
0
votes
1 answer

en.json 'Not Found' when serving SB Admin Bootstrap 4 template

I am using this template: https://github.com/start-angular/SB-Admin-BS4-Angular-4 On ng serve it is always throwing an error in console: GET http://localhost:4200/start-angular/SB-Admin-BS4-Angular-4/master/dist/assets/i18n/en.json 404 (Not…
Ixam Deirf
  • 425
  • 2
  • 6
  • 14
0
votes
1 answer

Angular 4 - Test setup error

I am writing a basic test to test the initialization of the component. Here it goes, import { NO_ERRORS_SCHEMA } from '@angular/core'; import { inject, async, TestBed, ComponentFixture, } from '@angular/core/testing'; import {…
lohiarahul
  • 1,432
  • 3
  • 22
  • 35
0
votes
1 answer

Angular's Zone.js hates RaphaelJS

I try to use RaphaelJS in Angular but zone.js doesn't want that: "ERROR" TypeError: e is undefined Stack trace: ["../../../../raphael/raphael.min.js"]/engine.create@http://localhost:4200/vendor.bundle.js:3632:9420 …
RoestVrijStaal
  • 151
  • 2
  • 7
0
votes
1 answer

Electron + Angular 4 = two ways data binding not working

Each time we want to update the UI we are forced to use the zone.run() method and this in not an option since it's unintuitive and force devs to add more repetitive code. Here our main dependencies: "dependencies": { "@angular/animations":…
A. Masson
  • 2,287
  • 3
  • 30
  • 36
0
votes
1 answer

can't downgrade zone.js angular

I can't seem to be able to downgrade my zone.js file from 0.8.10 to 0.8.5. This is required since I'm having app issues on older phones (Huawei w/ Android 5.1.1). Steps I've taken npm install zone.js@0.8.5 --save rmdir .\node_modules npm cache…
0
votes
1 answer

Angular 4: Call non-angular function from Service in index.html

I created a non-angular function in my service: import { Injectable } from '@angular/core'; @Injectable() export class MyService { ... } const myFunction = function(){ alert ( 'test' ); } And now, I want to call myFunction from the…
George Valentin
  • 618
  • 1
  • 10
  • 21
1 2 3
9
10