Ion 2 retains the sidemenu icon after pressing the navCtrl button

When I navigate to the page using navCtrl.push, the sidemenu icon (hamburger) is lost, and the back icon appears instead of the sidemenu icon.

What I want to do is save the sidemenu icon (put it on the right side of the navigator ion), and when I click the page on navCtrl, I’ll have both the back button and the sidemenu icon.

I use this piece of code on all pages:

<ion-header>
  <ion-navbar>
    <button ion-button menuToggle right>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>Post Offices</ion-title>
  </ion-navbar>
</ion-header>

And I use:

this.navCtrl.push(Page)

And it works fine (I am losing the menu icon, although there is no other problem).

+2
source share
1 answer

persistent="true" <ion-menu>, menuToggle . , docs

+11

Source: https://habr.com/ru/post/1658217/


All Articles