chore: update public api and integrate minor review comments

This commit is contained in:
Tobias Bosch
2016-08-02 07:54:14 -07:00
parent 34624b2db2
commit 3d53b33391
16 changed files with 61 additions and 41 deletions

View File

@ -78,11 +78,11 @@ export function bindDirectiveAfterViewLifecycleCallbacks(
}
export function bindInjectableDestroyLifecycleCallbacks(
provider: ProviderAst, directiveInstance: o.Expression, compileElement: CompileElement) {
provider: ProviderAst, providerInstance: o.Expression, compileElement: CompileElement) {
var onDestroyMethod = compileElement.view.destroyMethod;
onDestroyMethod.resetDebugInfo(compileElement.nodeIndex, compileElement.sourceAst);
if (provider.lifecycleHooks.indexOf(LifecycleHooks.OnDestroy) !== -1) {
onDestroyMethod.addStmt(directiveInstance.callMethod('ngOnDestroy', []).toStmt());
onDestroyMethod.addStmt(providerInstance.callMethod('ngOnDestroy', []).toStmt());
}
}