πŸ“Š Angular
Q. What is the role of `ngOnDestroy` lifecycle hook?
  • (A) Initialize component
  • (B) Cleanup before component is destroyed
  • (C) Detect changes
  • (D) Load data
πŸ’¬ Discuss
βœ… Correct Answer: (B) Cleanup before component is destroyed

Explanation: `ngOnDestroy` is used to unsubscribe and cleanup resources.

Explanation by: Mr. Dubey
`ngOnDestroy` is used to unsubscribe and cleanup resources.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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