Skip to content

Commit

Permalink
fix(nav): willLeave is called before willEnter
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Nov 15, 2016
1 parent f3b0333 commit b77b2ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/navigation/nav-controller-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,9 @@ export class NavControllerBase extends Ion implements NavController {
_viewsWillLifecycles(enteringView: ViewController, leavingView: ViewController) {
if (enteringView || leavingView) {
this._zone.run(() => {
// call each view's lifecycle events
enteringView && this._willEnter(enteringView);
// Here, the order is important. WillLeave must called before WillEnter.
leavingView && this._willLeave(leavingView);
enteringView && this._willEnter(enteringView);
});
}
}
Expand Down

0 comments on commit b77b2ae

Please sign in to comment.