1 year ago

#176759

test-img

Philipp

How to debug significant time difference between constructor and ngOnInit()

I have an angular app, where i open an angular material dialog. The opening of the dialog is triggered from two different places in my code. When I trigger it from place A, the dialog component loads as fast as expected. When I trigger it from place B, the dialog components loads really slowly. I timed the difference between when the constructor is called and when ngOnInit is called: Place A: 6 millisecons (i think this is normal) Place B: ~2 seconds (way too long)

How can i debug this Problem? How can i see what angular, the rendering engine, etc.. is doing during these 2 seconds?

Thanks!

angular

angular-material

angular-lifecycle-hooks

0 Answers

Your Answer

Accepted video resources