What it does
Lifecycle hook that is called when a directive, pipe or service is destroyed.
How to use
.
Interface Overview
Interface Description
ngOnDestroy
callback is typically used for any custom cleanup that needs to occur when the
instance is destroyed.
exported from core/index, defined in core/src/metadata/lifecycle_hooks.ts