refactor(upgrade): share code for destroying upgraded components between dynamic
and static
(#25357)
PR Close #25357
This commit is contained in:

committed by
Misko Hevery

parent
51c26b8afb
commit
71007ef9b2
@ -262,13 +262,7 @@ class UpgradeNg1ComponentAdapter implements OnInit, OnChanges, DoCheck {
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.controllerInstance && isFunction(this.controllerInstance.$onDestroy)) {
|
||||
this.controllerInstance.$onDestroy();
|
||||
}
|
||||
|
||||
this.componentScope.$destroy();
|
||||
}
|
||||
ngOnDestroy() { this.helper.onDestroy(this.componentScope, this.controllerInstance); }
|
||||
|
||||
setComponentProperty(name: string, value: any) {
|
||||
this.destinationObj ![this.propertyMap[name]] = value;
|
||||
|
Reference in New Issue
Block a user