0

What’s the difference between ngOnInit() and the constructor in an Angular component?

author
subina kallyani
easy
0
4

Answer

Constructor initializes class members, while ngOnInit() is called once the component is fully initialized (after Angular sets input bindings).

Click to Reveal Answer

Tap anywhere to see the solution

Revealed

Comments0