πŸ“Š Angular
Q. Which lifecycle hook is called when Angular destroys a component?
  • (A) ngOnDestroy
  • (B) ngOnInit
  • (C) ngAfterViewInit
  • (D) ngDoCheck
πŸ’¬ Discuss
βœ… Correct Answer: (A) ngOnDestroy

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
45
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
95%
Success Rate