hatemjapo
hatemjapo

Reputation: 840

Ionic remove back button and display Menu button

I am new to Ionic and i would like to remove the back button and only display the menu button on all my pages. Where can i do this?

Upvotes: 1

Views: 1106

Answers (1)

rahul patel
rahul patel

Reputation: 434

You need to add attribute persistent="true" to ion-menu

Like that.

<ion-menu side="left" [content]="content" persistent="true"></ion-menu>

then menuToggle button will be available on all views. You can find more details here in the docs.

For hiding back button you can try this code:

<ion-header>
   <ion-navbar hideBackButton >
    <ion-title>PageTitle</ion-title>
  </ion-navbar>
 </ion-header>

I tested in my project. It works fine.

Upvotes: 4

Related Questions