Sollicitatievraag bij PwC

What is components life cycle in angular

Antwoord op sollicitatievraag

Anoniem

20 mei 2026

Component life cycle hooks so many in our project we used ngonchanges() it is called when @input() value chnages , and ngoninit() it is used for initial load , form initialilization and ngafterviewinit() @viewchild() we go for it and ngondestroy() when unsubscribe the subscription we go for it to clean or unsubscribe the observable and all