πŸ“Š Angular
Q. Which lifecycle hook is used to clean up subscriptions?
  • (A) ngOnInit
  • (B) ngAfterViewInit
  • (C) ngOnDestroy
  • (D) ngDoCheck
πŸ’¬ Discuss
βœ… Correct Answer: (C) ngOnDestroy

Explanation: ngOnDestroy is used to clean up resources like subscriptions.

Explanation by: Kartik Sharma
ngOnDestroy is used to clean up resources like subscriptions.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
8
Total Visits
πŸ“½οΈ
26 d ago
Published
πŸŽ–οΈ
Kartik Sharma
Publisher
πŸ“ˆ
96%
Success Rate