A

Admin • 833K Points
Coach

Q. Which hook is used for cleanup logic before a component is destroyed?

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

Explanation by: Admin

`ngOnDestroy` is called just before Angular destroys the component.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.