0
votes

enter image description here

I am facing issue of back button disappearing in my ionic2 app. below are the steps after which issue is occuring

  1. Main screen - click on icon (page 1)

2.popover will come with 3 choices (popover - page 2)

3.select any option and new page will open (here back button is visible-page 3 ) click on '+' and go to new page(page 4)

4.come back to page 3 and back button is getting disappeared.

I have not written any specific code to show / hide back button as its working properly as per the default behaviour this issue only happening on android device not on ios. how to solve this?

1
what is this popover you speak of is it a modal? Can you give some info about how you are navigating?Mayank Singh Fartiyal
there is a page in my app which m opening using popover control below is code let popover = this.popoverCtrl.create('PopoverPage', { parameters }); popover.present({ ev: myEvent });Thakur
Did you use something like this when navigating from modal ? this.appCtrl.getRootNav().push(SecondPage);Mayank Singh Fartiyal
No . this is what i have used. this.navCtrl.push(strPagename, { parameters });Thakur
this.navCtrl.getRootNav().push(strPagename,{parameters}); use it like this and checkMayank Singh Fartiyal

1 Answers

0
votes
import { App } from 'ionic-angular';
constructor(public navCtrl: NavController public appCtrl: App) {
  }

function(){
    this.appCtrl.getRootNav().navCtrl.push(strPagename,{params: 
     params});
}

Read about navigation with overlay components here like modals ,popover,etc.

https://ionicframework.com/docs/api/navigation/NavController/

Also getRootNav will be deprecated soon and we should use getRootNavById