menuToggle not showing up


#1

Hi! I am trying to use menuToggle in my home page. But it’s not showing up. However, I used the inspect option from chrome and found that after deselecting display: none !important; (located in main.css) it worked and when i run again, it generates the below (css) code again and not showing the menu toggle.

auto-generated code in main.css
.hide, [hidden], template { display: none !important; }

header from home.html
<ion-header> <ion-navbar color="primary"> <button ion-button menuToggle start (click)="menuPage()"> <ion-icon name="menu"></ion-icon> </button> <ion-title class="home-title">Home</ion-title> </ion-navbar> </ion-header>

please help!


#2

try in home.ts: inside the contructor, this.menu.enable(true);


#3

Thanks for replying! do i have to import anything for the ‘menu’ property?


#4

import { MenuController } from ‘ionic-angular’


#5

Did you look at the “Persistent Menus” section of the Menu docs?


#6

Tried, Not working. It was working fine on my previous project. I don’t know what went wrong now. Anyway, i used css and styled the menu icon so that it shows up.