Q. Which hook is used for cleanup logic before a component is destroyed?
β
Correct Answer: (A)
ngOnDestroy
Explanation: `ngOnDestroy` is called just before Angular destroys the component.