Questions tagged [zonejs]

Implements Zones for JavaScript

Links

127 questions
1
vote
1 answer

How do we detect that Change Detection is been ran in Angular2 without direct @Output?

Consider the following component tree structure in Angular2 A B D E If D emits an event via click to B , angular2 will automatically start the change detection from root A. Is there a way to console.log that change detection out even if D…
testing
  • 2,303
  • 4
  • 20
  • 32
1
vote
1 answer

Should I use the NgZone class?

In AngularJS 2, most zone-related examples and articles center on the zone object and functions like zone.fork and zone.run. For example, this article and this video focus on the zone object. But the AngularJS 2 documentation presents a class named…
MatthewScarpino
  • 5,672
  • 5
  • 33
  • 47
0
votes
1 answer

Why does setTimeout inside runOutsideAngular callback skip change detection for the observable, even if markForCheck is called manually?

I've noticed a strange behavior of change detection in Angular. When Observable updated as in the example, change detection not triggered for some reason. The key here is setTimeout called inside the callback, if you remove it, change detection will…
0
votes
1 answer

Angular - Change Detection triggered when Strategy OnPush

I'm triggering tick() and detectChanges() in the root component. In root component I have one child with onPush strategy, which logically means it shouldn't triger that child component if data has not changed. Really small example about this…
0
votes
1 answer

Angular 13 window.ng.ɵcompilerFacade is replaced whenever new scripts are loaded

Update: I noticed that whenever we try to load a component/module it looks for window.ng.ɵcompilerFacade and expects it to be in v13 complaint format. But in between, if I load any web-component(built using elements) then it is replacing the…
vp310
  • 300
  • 1
  • 9
0
votes
1 answer

How to reveal what caused Angular ChangeDetection using ZoneJS?

I would like to find out, what is causing Change Detection cycles in my Angular (version 8 - I can't upgrade now) application. I would like to patch or intercept ZoneJS so I can see what has triggered the CD cycle. (For example: that tick() has been…
Felix
  • 3,999
  • 3
  • 42
  • 66
0
votes
1 answer

Integrate Splidejs into Grapesjs: failing instanceof HTMLElement

I am trying to integrate Splidejs into a Grapesjs editor. When mounting splides, I get the Uncaught Error: [splide] A track/list element is missing. After debugging, I realise that Splide does not find the required track or list HTML Element for…
Fred Klein
  • 448
  • 6
  • 13
0
votes
0 answers

How to separate Angular components (zonejs) from your application

I'm not AG expert, I'm a sencha ExtJs expert. A super nice framework that has it all but is not that widespread and popular (due to various reasons) as AG is. So my company started to move pieces to Angular webcomponents using webpack to slowly make…
VDP
  • 6,340
  • 4
  • 31
  • 53
0
votes
1 answer

http persist call outside Angular zone

I'm trying to figure out how NgZone works. Does the following example make sense? I read that every xhr call triggers the change detection. So this seems meaningful to me. Is it? persistData() { this.ngZone.runOutsideAngular(() => { …
Isaac Tack
  • 91
  • 1
  • 3
0
votes
1 answer

Angular with custom XHR polyfill not working beacause "outsite of zoneJS"

The problem is about making work one custom XHR polyfill with the zoneJS dectector of angular. The history: I'm using Ionic 4, with angular. At this moment i have warning about uiwebview api deprecation, so i try to add the…
nicearma
  • 750
  • 2
  • 8
  • 21
0
votes
0 answers

Angular AoT build not working with import in main.ts

A component I'm using in Angular overwrites window.Promise when loaded and causes a Zone.js error. To fix this, I've moved import 'zone.js/dist/zone'; from polyfills.ts and adding it to main.ts so that it gets loaded after the component. This isn't…
DrRelling
  • 122
  • 1
  • 4
  • 10
0
votes
1 answer

Angular 8: Disabling specific events from being checked on polyfills.ts isn't working

I'm developing an application in angular 8 that uses jsPlumbToolkit to display and edit flowcharts. However i was experiencing performance issues, so i started digging and eventually realized that the change detection from zone.js was running at…
0
votes
1 answer

Frontend address is add on baseurl in angular js and showing Not found 404 error

hlw,My base url is like this, export const environment = { production: false, baseUrl:"'http://localhost:9002" }; But its not hitting api and showing error loke this zone-evergreen.js:2952 POST…
0
votes
1 answer

How to load angular application with zone 0.8.5 on click of back button

Im loading my angular application in another (A) application. So there is an option for user to come back to A and again go back to angular application. With zonejs version 0.9.0 this will work fine, where as it will have an impact in my angular(4)…
Ani2019
  • 125
  • 2
  • 9
0
votes
1 answer

Change detection stopped working in Electron app when using zone.js 0.9.1

I updated an Electron app that I sort of inherited recently from Angular 6 to Angular 8. Using zone.js 0.9.1 (update: root cause is bug in this version of zonejs - see my self-answer below) Followed the upgrade guides, etc., got everything compiling…
nothingisnecessary
  • 6,099
  • 36
  • 60
1 2 3
8 9