Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hideBackButton attribute hides the menuToggle button too #7417

Closed
HamzaLJ opened this issue Jul 24, 2016 · 17 comments
Closed

hideBackButton attribute hides the menuToggle button too #7417

HamzaLJ opened this issue Jul 24, 2016 · 17 comments
Labels
ionitron: v3 moves the issue to the ionic-v3 repository

Comments

@HamzaLJ
Copy link

HamzaLJ commented Jul 24, 2016

The Problem
I push the Root Page to Page2 that supports a side menu, the issue is that when it opens Page2 it shows the back button and hides the menu button for that I've tried to add hideBackButton to Page2 in order to see the menu button but I both the back button and menu button disappeared!

Here is my current code:

  <ion-navbar hideBackButton>
       <button menuToggle start>
       <ion-icon name="menu"></ion-icon>
       </button>
 </ion-navbar>

What behavior are you expecting?

Should hide the back button, and show the menu button.

Which Ionic Version?
Ionic2

Cordova CLI: Not installed
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 7.3.1 Build version 7D1014

@HamzaLJ HamzaLJ changed the title hideBackButton attributes hides the menuToggle button too hideBackButton attribute hides the menuToggle button too Jul 24, 2016
@esqew
Copy link

esqew commented Jul 25, 2016

Having this issue as well, my code is similar to the OP.

Cordova CLI: 6.2.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS 
Node Version: v6.3.0

@jgw96
Copy link
Contributor

jgw96 commented Jul 26, 2016

Hello, thanks for opening an issue with us! Would you be able to provide a plunker that demonstrates this issue? Thanks for using Ionic!

@jgw96 jgw96 added needs: reply the issue needs a response from the user and removed menus labels Jul 26, 2016
@esqew
Copy link

esqew commented Jul 27, 2016

I know you asked for a plnkr; I hope a CodePen will suffice. https://codepen.io/esqew/pen/QExGrE

The toggleMenu button is displayed on the first page - after clicking through to a list item, the left side navigation button is blank. The HTML should provide a toggleMenu button (as with the root page).

This issue is only when using the hideBackButton directive.

@jgw96
Copy link
Contributor

jgw96 commented Jul 27, 2016

Hello @esqew unfortunately that codepen is using a very outdated version of ionic 2. Would you be able to use this plunker to make an example? Thanks for using Ionic!

@esqew
Copy link

esqew commented Jul 29, 2016

Hi again, I've reproduced the issue in this plunker. When you use this.nav.push(Page1) the page is pushed to the navigation stack, but the hideBackButton directive hides the menu item that's supposed to be displayed (and is in fact displayed on the rootPage).

@jgw96 jgw96 removed the needs: reply the issue needs a response from the user label Aug 24, 2016
@neslinesli93
Copy link

Did you guys manage to solve this?
I mean, this is a really basic use case, I am surprised this issue hasn't been fixed.

When using a side menu, I want to be able to cache the views as I transition between the menu entries.
This isn't possible using nav.setRoot() as it wipes the navigation stack. That's where nav.push() comes into place, pushing the sidemenu entries into the navigation stack, thus caching the views.
However, it shows the back button along with the menu toggle. The ion-navbar property hideBackButton seems perfect for this, but it hides both the back button AND the menu toggle.

How are we supposed to implement views caching when using sidemenu design? Is this a bug?
Thanks, and keep up with the good work!

@esqew
Copy link

esqew commented Oct 28, 2016

Still not working even after updating to 2.1.2.

Cordova CLI: 6.3.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.36
ios-deploy version: 1.8.2
ios-sim version: 5.0.3
OS: Mac OS X Sierra
Node Version: v7.0.0
Xcode version: Xcode 8.0 Build version 8A218a

@Abhishek134
Copy link

Did anyone able to solve it?
I'm also troubling with the same.
I'm using ionic cli V3.6.0.
ionic (Ionic CLI) : 3.6.0
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.0
System:
Node : v8.1.4
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 6.0.0
npm : 5.0.3

@vvrahul
Copy link

vvrahul commented Jul 30, 2017

Hi Here is the solution ,

if you are using this.navCtrl.push(page2) it just push the component to the main root .. instead of this we can use

this.navCtrl.setRoot(Page2);

hope this will hep you people

@pertsenga
Copy link

This is ugly but what I did was call this.navCtrl.setRoot(page) twice and the menu button shows. idk why but it worked

@karmastudy
Copy link

karmastudy commented Nov 1, 2017

Hi,
Using this.navCtrl.push(page); or this.navCtrl.setRoot(page); I can see the menuToogle button, but it doesn't work. By clicking the button nothing happens.

Thanks for help

@devpato
Copy link

devpato commented Dec 26, 2017

@karmastudy

put a clicker on the button of the menu

onOpenMenu(){
    this.menuCtrl.open();    
  }

don't forget to import MenuController from ionic-angular and declare it in the contructor

@giovannipds
Copy link

giovannipds commented Jun 6, 2018

It's also possible to avoid that with:

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

@pratik8490
Copy link

how to display menu i can't show menu after login screen to go home screen

iva2k added a commit to iva2k/ionic that referenced this issue Jul 31, 2018
iva2k added a commit to iva2k/ionic that referenced this issue Jul 31, 2018
This was referenced Jul 31, 2018
@adamdbradley adamdbradley added the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 1, 2018
@imhoffd imhoffd removed ionitron: v3 moves the issue to the ionic-v3 repository labels Nov 1, 2018
@imhoffd imhoffd added the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 1, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Nov 1, 2018

Thanks for the issue! We have moved the source code and issues for Ionic 3 into a separate repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

Thank you for using Ionic!

@imhoffd imhoffd removed the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 28, 2018
@Ionitron Ionitron added the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 28, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Nov 28, 2018

This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know!

Thank you for using Ionic!

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 28, 2018

Issue moved to: ionic-team/ionic-v3#121

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: v3 moves the issue to the ionic-v3 repository
Projects
None yet
Development

No branches or pull requests