A callback method that is invoked immediately after
Angular has completed initialization of all of the directive's
content.
It is invoked only once when the directive is instantiated.
Returns void
ngOnDestroy
ngOnDestroy():void
A callback method that performs custom clean-up, invoked immediately
before a directive, pipe, or service instance is destroyed.
A callback method that is invoked immediately after Angular has completed initialization of all of the directive's content. It is invoked only once when the directive is instantiated.