0
votes
Ionic version:

[ ] 1.x 

[x] 2.x RC5

[x] bug report

[ ] feature request

[ ] support request

Current behavior:

There is no transition ocurring after pressing the navbar back button, or a custom "pop" button or the native hardware back button on the android phone.

It works with 'ionic serve' but not when 'ran as an apk'

Expected behavior:

It should make a transition back to the last page on the navcontroller stack.

Steps to reproduce:

Click on the navbar back button in 'native mode'

Related code:

  <ion-navbar hideBackButton="true">
    <button (click)="back()" ion-button icon-left clear small>
    <ion-icon name="arrow-back"></ion-icon>
    <div> Voltar</div>
    </button>
  </ion-navbar>

public back = (url) => this.navCtrl.pop();

Other information:

enter image description here

Zenfone 2

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Your system information:

ordova CLI: 6.4.0

Ionic Framework Version: 2.0.0-rc.5

Ionic CLI Version: 2.1.18

Ionic App Lib Version: 2.1.9

Ionic App Scripts Version: 1.0.0

ios-deploy version: Not installed

ios-sim version: Not installed

OS: Windows 10

Node Version: v7.4.0

Xcode version: Not installed

https://github.com/driftyco/ionic/issues/10097

1

1 Answers

0
votes

In the html you are not passing any arguments to the back function but in your ts file, you are taking an argument called "url" for your back function.

//On a sidenote try declaring your function like below instead of assigning a public variable back to a function : 

back(){
    this.navCtrl.pop()
}