fix(ivy): ngOnDestroy hooks should be called on providers (#27955)

PR Close #27955
This commit is contained in:
Marc Laval
2019-01-07 17:07:39 +01:00
committed by Kara Erickson
parent 996435b79a
commit e775313188
7 changed files with 139 additions and 41 deletions

View File

@ -234,6 +234,10 @@ export class NodeInjectorFactory {
* Set to `true` if the token is declared in `viewProviders` (or if it is component).
*/
isViewProvider: boolean,
/**
* Set to `true` if the token is a provider, and not a directive.
*/
public isProvider: boolean,
injectImplementation: null|(<T>(token: Type<T>|InjectionToken<T>, flags: InjectFlags) => T)) {
this.canSeeViewProviders = isViewProvider;
this.injectImpl = injectImplementation;