Ionic 2 - Disabling back button for a specific view

前端 未结 5 2044
小鲜肉
小鲜肉 2020-12-04 15:26

So I\'m messing around a bit with Ionic 2, and I want to know how to disable the back button for a specific view.

What I\'m doing is this.nav.

5条回答
  •  無奈伤痛
    2020-12-04 16:01

    In order to prevent hideBackButton to hide your menu icon, use this css in your app.scss:

    ion-navbar[hidebackbutton] button[menutoggle] {
      display: block !important;
    }
    

    or in case you want somewhere to be shown and somewhere not, change your selector as follow: ion-navbar[hidebackbutton].show-menu button[menutoggle]

提交回复
热议问题