A

Admin • 828.70K Points
Coach

Q. What is the role of `ngOnDestroy` lifecycle hook?

  • (A) Initialize component
  • (B) Cleanup before component is destroyed
  • (C) Detect changes
  • (D) Load data
  • Correct Answer - Option(B)
  • Views: 7
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
`ngOnDestroy` is used to unsubscribe and cleanup resources.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.