You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When declaring a service as a component provider by the structure below Angular doesn't call ngOnDestroy method declared in BaseClass when a component is being destroyed.
abstractclassBaseClassimplementsOnDestroy{ngOnDestroy(){console.log('destroying');//this is not called}}classFooClassextendsBaseClass{}
🐞 bug report
Affected Package
The issue is caused by package @angular/coreIs this a regression?
I don't knowDescription
When declaring a service as a component provider by the structure below Angular doesn't call
ngOnDestroy
method declared inBaseClass
when a component is being destroyed.🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-service-destroy🌍 Your Environment
Angular Version:
But it also appears on 7.2.5
The text was updated successfully, but these errors were encountered: