Q. What is the Angular lifecycle hook used for cleanup before a component is destroyed?
β
Correct Answer: (B)
ngOnDestroy
Explanation: ngOnDestroy allows releasing resources or unsubscribing before destruction.