Skip to content

Commit

Permalink
fix(angular): removeViewFromDom
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Mar 20, 2018
1 parent 3a26256 commit 41f54f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/src/components/nav/view-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class ViewController {

const component = this.component;
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;
});
}
Expand Down Expand Up @@ -102,9 +102,12 @@ export class ViewController {

const element = this.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._state = ViewState.Destroyed;
}
Expand Down
1 change: 1 addition & 0 deletions core/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './haptic';
export * from './keyboard';
export * from './transition';

0 comments on commit 41f54f8

Please sign in to comment.