parent
d094a85647
commit
0fc9ec248e
|
@ -22,6 +22,7 @@ export interface IRootScopeService {
|
|||
$new(isolate?: boolean): IScope;
|
||||
$id: string;
|
||||
$watch(expr: any, fn?: (a1?: any, a2?: any) => void): Function;
|
||||
$destroy(): any;
|
||||
$apply(): any;
|
||||
$apply(exp: string): any;
|
||||
$apply(exp: Function): any;
|
||||
|
|
|
@ -160,7 +160,10 @@ export class DowngradeNg2ComponentAdapter {
|
|||
}
|
||||
|
||||
registerCleanup() {
|
||||
this.element.bind('$destroy', () => this.viewManager.destroyRootHostView(this.hostViewRef));
|
||||
this.element.bind('$destroy', () => {
|
||||
this.componentScope.$destroy();
|
||||
this.viewManager.destroyRootHostView(this.hostViewRef);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue