A

Admin • 832.27K Points
Coach

Q. What does `ngOnInit` lifecycle hook do?

  • (A) Initializes the component after Angular sets the data-bound properties
  • (B) Destroys the component
  • (C) Creates the component
  • (D) Validates the form
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

`ngOnInit` is called once, after the first `ngOnChanges`, and is used to initialize the component.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.