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

Explanation: ngOnDestroy is used to perform cleanup tasks like unsubscribing from Observables.

Explanation by: Mr. Dubey
ngOnDestroy is used to perform cleanup tasks like unsubscribing from Observables.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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