Navigation history to a Tabs page doesn't work


#1

Hello,

I have a root page who displays a basic ion-list with a FAB button.
When i click on the FAB button to create a new item, i perform a :
this.nav.push(CreatePage, { myParams });

The CreatePage is a TabPage like this :

@Page({
  template: `
    <ion-tabs [selectedIndex]="selectedTab">
      <ion-tab tabTitle="A" [root]="ATab" [rootParams]="{ myParams }"></ion-tab>
      <ion-tab tabTitle="B" [root]="BTab" [rootParams]="{ myParams  }"></ion-tab>
      <ion-tab tabTitle="C" [root]="Tab" [rootParams]="{ myParams  }"></ion-tab>
    </ion-tabs>`
})
export class CreatePage {
// [...]
}

No matter of the tab where i am, if i tap on the back button on my Android device, the entire app closes and i get back to my home screen instead of returning to my ion-list page.

I have the same behavior if i open a modal from a tab page. When i tap on back button, i go back to the home screen.

Here is the code of a tab page :

@Page({
  templateUrl: 'build/pages/create-page/a-tab.html'
})
export class ATab {
// [...]
}

<ion-navbar *navbar secondary>
  <ion-buttons start>
    <button (click)="cancel()">
      <ion-icon name="close"></ion-icon>
    </button>
  </ion-buttons>
  <ion-title>Create</ion-title>
  <ion-buttons end>
    <button (click)="save()">
      <ion-icon name="checkmark"></ion-icon>
    </button>
  </ion-buttons>
</ion-navbar>

<ion-content>
<!-- ... -->
</ion-content>

Also, when i go to the create page, the navbar never shows the back icon on Android or my web browser (using ionic serve).

  • Windows 10

Cordova CLI: 6.1.0 (cordova-lib@undefined)
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.23
Ionic App Lib Version: 2.0.0-beta.13
OS:
Node Version: v4.2.3