mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(angular): removeViewFromDom
This commit is contained in:
@ -47,7 +47,7 @@ export class ViewController {
|
|||||||
|
|
||||||
const component = this.component;
|
const component = this.component;
|
||||||
if (this.delegate) {
|
if (this.delegate) {
|
||||||
return this.delegate.attachViewToDom(container, component, this.data, ['ion-page']).then(el => {
|
return this.delegate.attachViewToDom(container, component, this.data, ['ion-page', 'hide-page']).then(el => {
|
||||||
this.element = el;
|
this.element = el;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -102,9 +102,12 @@ export class ViewController {
|
|||||||
|
|
||||||
const element = this.element;
|
const element = this.element;
|
||||||
if (element) {
|
if (element) {
|
||||||
element.remove();
|
if (this.delegate) {
|
||||||
|
this.delegate.removeViewFromDom(element.parentElement, element);
|
||||||
|
} else {
|
||||||
|
element.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._nav = this._cntDir = this._leavingOpts = null;
|
this._nav = this._cntDir = this._leavingOpts = null;
|
||||||
this._state = ViewState.Destroyed;
|
this._state = ViewState.Destroyed;
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
export * from './haptic';
|
export * from './haptic';
|
||||||
export * from './keyboard';
|
export * from './keyboard';
|
||||||
|
export * from './transition';
|
||||||
|
Reference in New Issue
Block a user