Questions tagged [zonejs]

Implements Zones for JavaScript

Links

127 questions
2
votes
2 answers

Angular2 Change Detection with Zones

I am wondering if all asynchronous events and callbacks can be traced back to a specific source component by wrapping all component logic (including logic of non-component directives inside component) in a zone, then only that source component needs…
geeko
  • 2,649
  • 4
  • 32
  • 59
2
votes
1 answer

How do I embed/isolate JS components (Google Maps) in an Angular2 app?

While attempting to embed a Google Maps (API v3) widget inside an Angular2 app, I discovered that there's a click/drag error that disturbs me. I want to know if there's a good way I can embed the Google Map component it is isolated from Angular.…
montooner
  • 1,112
  • 4
  • 17
  • 29
1
vote
1 answer

Angular 16 Signal update doesn't update view

I am testing angular 16 signals and per my understanding, when I disable zone.js and call signal.update() the view should be updated with new value. It is not. Please help me to understand…
kkleczek
  • 17
  • 3
1
vote
1 answer

Angular - detectChanges does not invoke ngDoCheck()

I'm running cdr.detectChanges() in some nested child (Child1) that has parent and also another nested child component (Child2). Why if I will run trigger detectChanges method in Child1 component - only ngDoCheck is invoked in Child2 component?…
1
vote
1 answer

How can I force @angular/core to use the latest version of zone.js in its peerDependencies configuration?

This test passes but results in a problem: it('should retrieve data on getDownloadProgress() call', (done: DoneFn) => { let response = { 'process': {}, 'success': 'success', } as IPollResponse; …
keeehlan
  • 7,874
  • 16
  • 56
  • 104
1
vote
0 answers

How can I make Angular Universal with Zone.JS wait for an AWS Lambda SDK invoke call

I'm using Angular Universal with Zone.JS and until now thought that it was waiting for my API calls to resolve before delivering the response. As I understand it, Zone.JS patches various libraries in order to know when the application has settled…
creamcheese
  • 2,524
  • 3
  • 29
  • 55
1
vote
1 answer

Angular ChangeDetectionStrategy and disabling zone.js

I'm currently working on very lightweight Angular Elements with Ivy (v10.1.2). When I don't import zone.js in my polyfills.ts and "disable" it in my main.ts as follows: platformBrowserDynamic() .bootstrapModule(AppModule, { ngZone: 'noop' }) …
fox
  • 157
  • 1
  • 11
1
vote
1 answer

AgGrid Cell Component agInit runs sometimes outside of the zone

Issue We use a Angular cell component which contains a button. I noticed that sometimes (approximately 1 out of 10 times) the button event is handled outside of the zone which leads to issues. What I've found out so far agInit sometimes runs outside…
chriskohler
  • 155
  • 1
  • 9
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
0 answers

Is there a way to write a funcion with async/await native?

I need to write a function that uses native async/await in Angular. Example: var function = () => { var _self = {}; _self.test = async () => { return await someAsyncFunc(); } return _self; } When I do ng build --prod the…
Xuty
  • 11
  • 1
  • 3
1
vote
1 answer

Implementing a zonejs-less angular 8 project

I was migrating my angular project to angular 8 and came across these two articles…
tatsu
  • 2,316
  • 7
  • 43
  • 87
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
0 answers

Multiple file upload `reader.onloadend` is not firing

I'm using p-fileUpload in Angular 6.0.0 app, for uploading the image files (In this case multiple images files). It has an event handler (uploadHandler) for the uploaded files.
Yashwardhan Pauranik
  • 5,370
  • 5
  • 42
  • 65
1
vote
1 answer

Patching Element.prototype.addEventListener breaks any Angular 2 app

I have an Angular 2 app https://github.com/DanWahlin/Angular-JumpStart. I tried to patch Element.prototype.addEventListener for some of my use case. Here is the patch: var origLis =…
skjindal93
  • 706
  • 1
  • 16
  • 34
1
vote
1 answer

Angular: Async process not triggering changeDetection only in >= Chrome 64

I'm monitoring the size of an element in angular using ResizeObserver observer = new window.ResizeObserver(entries => { ... someComponent.width = width; }); observer.observe(target); stackblitz When you run the code in safary, firefox…
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
1 2 3
8 9