πŸ“Š Angular
Q. What is the Angular lifecycle hook used for cleanup before a component is destroyed?
  • (A) ngOnInit
  • (B) ngOnDestroy
  • (C) ngAfterViewInit
  • (D) ngDoCheck
πŸ’¬ Discuss
βœ… Correct Answer: (B) ngOnDestroy

Explanation: ngOnDestroy allows releasing resources or unsubscribing before destruction.

Explanation by: Mr. Dubey
ngOnDestroy allows releasing resources or unsubscribing before destruction.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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