Ronan Lopes
Ronan Lopes

Reputation: 3398

Menu Button disappearing after show modal

my Ionic 2 app has a problem when I show a modal on my home page: when the user closes the modal and get back to the home page, the menu button is not there. That only happens when that modal is shown. Not sure if I'm doing something wrong with the navController. Anyone faced this problem? The header of my page is like this:

<ion-header>
  <ion-navbar>
    <ion-buttons left class="menu-button">
      <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
      </button>
    </ion-buttons>
    <ion-title text-center>
      <div class="text-header">Home Page</div>
    </ion-title>
  </ion-navbar>
</ion-header>

I call the modal like this:

const modal = this.modalCtrl.create(SetMotivoIntervalo, {chamada_id: this.chamada_id});
modal.present();

And for closing modal:

onCloseModal(){
    this.viewCtrl.dismiss();
}

Upvotes: 1

Views: 535

Answers (1)

Swapnil Patwa
Swapnil Patwa

Reputation: 4089

Try adding enable-menu-with-back-views="true" property to ion-side-menus

 <ion-side-menus enable-menu-with-back-views="true">

 </ion-side-menus>

Upvotes: 1

Related Questions