Skip to content

Commit

Permalink
fix(loading): fix animation for loading the first time
Browse files Browse the repository at this point in the history
references #5426
  • Loading branch information
brandyscarney committed Apr 5, 2016
1 parent 41a6524 commit 6cd90ee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ionic/components/nav/nav-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class NavController extends Ion {
provide(NavController, {useValue: this})
]);
}

setPortal(val: Portal) {
this._portal = val;
}
Expand Down Expand Up @@ -439,8 +439,8 @@ export class NavController extends Ion {
keyboardClose: false,
direction: 'back',
animation: enteringView.getTransitionName('back')
});
});

if (enteringView.usePortal && this._portal) {
this._portal.present(enteringView);
return;
Expand Down Expand Up @@ -1098,7 +1098,9 @@ export class NavController extends Ion {
this._trans && this._trans.destroy();
this._trans = transAnimation;

if (opts.animate === false) {
// Portal elements should always animate
// so ignore this if it is a portal
if (opts.animate === false && this._portal) {
// force it to not animate the elements, just apply the "to" styles
transAnimation.duration(0);
}
Expand Down Expand Up @@ -1259,7 +1261,7 @@ export class NavController extends Ion {

// see if we should add the swipe back gesture listeners or not
this._sbCheck();

if (this._portal) {
this._portal._views.forEach(view => {
if (view.data && view.data.dismissOnPageChange) {
Expand Down

0 comments on commit 6cd90ee

Please sign in to comment.