A

Admin • 833.24K Points
Coach

Q. What is the Angular lifecycle hook used for cleanup before a component is destroyed?

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

Explanation by: Admin

ngOnDestroy allows releasing resources or unsubscribing before destruction.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.