fix(upgrade): leak when angular1 destroys element

Fixes #6401

Closes #7935
This commit is contained in:
Andrei Alecu
2016-01-13 16:35:48 +02:00
committed by Alex Rickabaugh
parent 74e2bd7e3e
commit 9be04f8d38
2 changed files with 30 additions and 1 deletions

View File

@ -160,7 +160,7 @@ export class DowngradeNg2ComponentAdapter {
}
registerCleanup() {
this.element.bind('$remove', () => this.viewManager.destroyRootHostView(this.hostViewRef));
this.element.bind('$destroy', () => this.viewManager.destroyRootHostView(this.hostViewRef));
}
}