Q. Which lifecycle hook is called before Angular destroys the component?

  • (A) ngOnDestroy
  • (B) ngAfterViewInit
  • (C) ngDoCheck
  • (D) ngAfterContentInit
πŸ’¬ Discuss
βœ… Correct Answer: (A) ngOnDestroy
Explanation: ngOnDestroy is called just before Angular destroys the component.
Explanation by: Mr. Dubey
ngOnDestroy is called just before Angular destroys the component.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
65
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate