fix(angular): removeViewFromDom

This commit is contained in:
Manu Mtz.-Almeida
2018-03-20 17:21:02 +01:00
parent 3a26256a5c
commit 41f54f8e2d
2 changed files with 7 additions and 3 deletions

View File

@ -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;
} }

View File

@ -1,2 +1,3 @@
export * from './haptic'; export * from './haptic';
export * from './keyboard'; export * from './keyboard';
export * from './transition';