A

Admin • 828.70K Points
Coach

Q. Which lifecycle hook is called when Angular destroys a component?

  • (A) ngOnDestroy
  • (B) ngOnInit
  • (C) ngAfterViewInit
  • (D) ngDoCheck
  • Correct Answer - Option(A)
  • Views: 7
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
ngOnDestroy is used for cleanup before a component is removed.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.