0
What’s the difference between ngOnInit() and the constructor in an Angular component?
subina kallyani
easy
0completed
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