问题
I have implemented a hamburgermenu in Ionic 3, but I am facing an issue. When I run the application on my Android device the hamburgermenu keeps disappearing i.e. the button to open the side menu is gone. However, it only happens sometimes. I tried to run the application while inspecting it with Google Chrome, and what I noticed is that the menutoggle gets hidden for some reason, but I don't know why. I don't control the visibility in the .ts class.
<ion-header>
<div>
<ion-navbar>
<button ion-button menuToggle> // this becomes "<button ion-button menuToggle hidden>"
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>Frontpage</ion-title>
</ion-navbar>
</div>
</ion-header>
回答1:
I am having similar issue for menu toggle.
I added below code for my page.
Header html code:
<ion-header>
<ion-navbar text-center color="navBar">
<ion-buttons right>
<button class="menu" ion-button menuToggle="right" icon-only>
<ion-icon name="menu"></ion-icon>
</button>
</ion-buttons>
<ion-title>Password Reset</ion-title>
</ion-navbar>
</ion-header>
Header css code:
.menu {
display: block !important;
}
来源:https://stackoverflow.com/questions/50068182/ionic-3-menutoggle-keeps-getting-hidden