Questions tagged [angular-ngzone]

9 questions
19
votes
1 answer

How to find which async action triggers ngZone (that lead to Change Detection)?

Any changes in the stack trace of updates always lead back to globalZoneAwareCallback. How do you find out what triggered the change? In terms of debugging it's good to have a clear picture.
user2167582
  • 5,986
  • 13
  • 64
  • 121
5
votes
2 answers

Why does Angular async pipe uses cdr.markForCheck() and not cdr.detectChanges()?

I have a general Angular question: Why does Angular async pipe use cdr.markForCheck() instead of cdr.detectChanges()? What I see there are two main differences in these two 'styles': markForCheck() marks the path to be checked up to the root…
Felix
  • 3,999
  • 3
  • 42
  • 66
3
votes
2 answers

Angular Custom Elements & Angular 8 Material: MatDialog and MatMenu not working

I am using angular custom elements to build an application in which a MatDialog is part of the custom element. I have a MatMenu in the host application as well. Problem is, when I open the mat-dialog on page load and then open the mat-menu, the…
1
vote
1 answer

ngOnInit is not working when the server send event service used in multiple componenets

I created a service for getting SSE(server send events) from backend(Node). When I use this service in one component it's working as expected. But when I try to use in multiple components at very first time ngoninit triggers and loads the data…
1
vote
0 answers

Angular 8 Local Library import issue

I have created one Angular custom Library which I need to use in multiple projects in different workspace. I will plan to publish Library to NPM once I test it properly locally. below is my Library code : import { NgModule } from…
ldev
  • 51
  • 4
0
votes
0 answers

What is the purpose of running code in NgZone.run in angular?

I came across this following code which invokes a dialog inside NgZone.run method. What is the purpose of invoking a dialog inside NgZone.run?
wonderful world
  • 10,969
  • 20
  • 97
  • 194
0
votes
0 answers

Angular 13 Error: Type NgZone does not have 'ɵmod' property

In my Angular 13 Ionic app, as soon as I add the NgZone to app.module.ts - I get this error: core.mjs:1130 Uncaught Error: Type NgZone does not have 'ɵmod' property. I tried following suggested solutions in github here and others, such as: npm…
Mor Sagmon
  • 905
  • 1
  • 16
  • 35
0
votes
1 answer

How to trace 'Navigation triggered outside Angular zone' to origin, it it's possible

My Angular 11 application triggers this warning in console: Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'? core.js:27937 Is there a way to trace that warning to the point in my code that might…
VBobCat
  • 2,527
  • 4
  • 29
  • 56
0
votes
1 answer

Subscribe not working even in NgZone.run()

I read articles on how to use NgZone in angular. But still I'm not able to enter subscribe in the first call of execution. Please help me with this. Thanks in advance :) constructor(private _apicallservice: ApiCallService, private _ngzone : NgZone)…