A

Admin • 832.27K Points
Coach

Q. What is the purpose of `ngOnInit` lifecycle hook?

  • (A) It is called after Angular initializes the component's data-bound properties
  • (B) It is called before the constructor
  • (C) It is used for module loading
  • (D) It is used for routing
  • Correct Answer - Option(A)
  • Views: 19
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

`ngOnInit` is commonly used to perform initialization logic for the component.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.