Q. What happens when a component is destroyed in Angular?
β
Correct Answer: (B)
ngOnDestroy is called and subscriptions should be cleaned up
Explanation: ngOnDestroy is the hook where cleanup tasks like unsubscribing are done.