A

Admin • 833K Points
Coach

Q. Which lifecycle hook is called when a component is about to be destroyed?

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

Explanation by: Admin

ngOnDestroy is used for cleanup before the component is removed.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.