OnDestroy
interface
A lifecycle hook that is called when a directive, pipe, or service is destroyed. Use for any custom cleanup that needs to occur when the instance is destroyed.
API
Usage Notes
interface OnDestroy { ngOnDestroy(): void;}}
Jump to details