Skip to content

Commit

Permalink
fix(navigation): update the URL if there are no children navs
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Apr 4, 2017
1 parent 33be36d commit 8586cc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/navigation/nav-controller-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ export class NavControllerBase extends Ion implements NavController {
// it's safe to enable the app again
this._app.setEnabled(true);

if (opts.updateUrl !== false) {
if (!this.hasChildren() && opts.updateUrl !== false) {
// notify deep linker of the nav change
// if a direction was provided and should update url
this._linker.navChange(opts.direction);
Expand Down Expand Up @@ -924,6 +924,10 @@ export class NavControllerBase extends Ion implements NavController {
this._app.viewWillUnload.emit(view);
}

hasChildren(): boolean {
return this._children.length > 0;
}

getActiveChildNav(): any {
return this._children[this._children.length - 1];
}
Expand Down

0 comments on commit 8586cc1

Please sign in to comment.