Display menu button instead of back button

So…in my app after successfull user login i have given this

 this.navCtrl.push(HomePage);

This works perfectly in my browser , but when i run the app in my android device the header part which contained the menu button does not have the button instead it becomes a back button to navigate into previous page. And swipe to view the menu is also not available.

Is it because in the login ts file i have given this to disable menu.

 ionViewDidLoad() {
    console.log('ionViewDidLoad LoginPage');
    this.menu.swipeEnable(false, 'sidemenu');
  }

Some quick help will be much appreciated. And note that this is working perfectly in the browser

maybe use this?
this.navCtrl.setRoot(HomePage);

Hi @emiljenson,

If you do not want to have the back button visible in the header after login then write below mentioned code

this.navCtrl.setRoot(HomePage); instead of this.navCtrl.push(HomePage); this.

Hope this will help you.

1 Like

@FnnHuman and @addwebsolution Thanks Guys . This solve my issue. I didn’t think that would be this simple :smiley:

If in the future there comes the need to just remove the back button from the navbar and have a page navigation stack, you can add this attribute to your navbar component :

  <ion-navbar hideBackButton>
  </ion-navbar>