A

Admin • 833.24K Points
Coach

Q. What does the 'ngOnInit' lifecycle hook do?

  • (A) Initializes the component after constructor
  • (B) Destroys the component
  • (C) Detects changes in inputs
  • (D) Initializes view children
  • Correct Answer - Option(A)
  • Views: 22
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

ngOnInit runs after Angular sets the component's input properties.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.