# Display menu button instead of back button

**URL:** <https://forum.ionicframework.com/t/display-menu-button-instead-of-back-button/104947>\
**Category:** ionic-v3\
**Created:** [September 11, 2017, 1:21pm UTC](https://forum.ionicframework.com/t/display-menu-button-instead-of-back-button/104947 "2017-09-11T13:21:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emiljenson](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/emiljenson/32/109430_2.png) [@emiljenson](https://forum.ionicframework.com/u/emiljenson)\
**Post date:** [September 11, 2017, 1:21pm UTC](https://forum.ionicframework.com/t/display-menu-button-instead-of-back-button/104947/1 "2017-09-11T13:21:04Z")

</div>

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

```auto
 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.

```auto
 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

---

<div class="post-metadata">

**Author:** ![FnnHuman](https://avatars.discourse-cdn.com/v4/letter/f/5f8ce5/32.png) [@FnnHuman](https://forum.ionicframework.com/u/FnnHuman)\
**Post date:** [September 11, 2017, 1:27pm UTC](https://forum.ionicframework.com/t/display-menu-button-instead-of-back-button/104947/2 "2017-09-11T13:27:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![addwebsolution](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/addwebsolution/32/120392_2.png) [@addwebsolution](https://forum.ionicframework.com/u/addwebsolution)\
**Post date:** [September 11, 2017, 1:29pm UTC](https://forum.ionicframework.com/t/display-menu-button-instead-of-back-button/104947/3 "2017-09-11T13:29:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![emiljenson](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/emiljenson/32/109430_2.png) [@emiljenson](https://forum.ionicframework.com/u/emiljenson)\
**Post date:** [September 11, 2017, 1:39pm UTC](https://forum.ionicframework.com/t/display-menu-button-instead-of-back-button/104947/4 "2017-09-11T13:39:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sidharth\_1999](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Sidharth\_1999](https://forum.ionicframework.com/u/Sidharth_1999)\
**Post date:** [September 11, 2017, 2:02pm UTC](https://forum.ionicframework.com/t/display-menu-button-instead-of-back-button/104947/5 "2017-09-11T14:02:06Z")

</div>

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>
```
