hi
import {IonicApp} from 'ionic/ionic';
Do i have to install IonicApp in my ionic its not working
hi
import {IonicApp} from 'ionic/ionic';
Do i have to install IonicApp in my ionic its not working
displaying cannot reaD PROPERTY enable OF NULL
Where is this coming from??
import {IonicApp, Page, NavController} from āionic/ionicā;
That comment is pretty old, the syntax has changed. The docs for the latest version can be found here: http://ionicframework.com/docs/api/components/app/MenuController/
<ion-menu id="authenticated" side="left" [content]="mycontent">...</ion-menu>
<ion-menu id="unauthenticated" side="left" [content]="mycontent">...</ion-menu>
<ion-nav #mycontent [root]="rootPage"></ion-nav>
import { Component } from '@angular/core';
import { MenuController } from 'ionic-angular';
@Component({...})
export class MyPage {
constructor(public menuCtrl: MenuController) {
}
openMenu() {
this.menuCtrl.open();
}
closeMenu() {
this.menuCtrl.close();
}
toggleMenu() {
this.menuCtrl.toggle();
}
enableAuthenticatedMenu() {
this.menuCtrl.enable(true, 'authenticated');
this.menuCtrl.enable(false, 'unauthenticated');
}
}
The source for the API demo is here: https://github.com/ionic-team/ionic/blob/master/demos/src/menu/pages/page-one/page-one.ts
Edit: updated my previous comment with the correct syntax.
import { MenuController } from āionic-angularā;
constructor(⦠⦠⦠ā¦,private menu : MenuController)
ionViewDidEnter() {
// the root left menu should be disabled on this page
this.menu.enable(false);
}
ionViewWillLeave() {
// enable the root left menu when leaving this page
this.menu.enable(true);
}
this will hide the menu
ionViewDidLoad() {
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.statusBar.styleDefault();
this.menu.enable(false, āleftMenuā);
this.menu.swipeEnable(false, āleftMenuā);
this.splashScreen.hide();
});
}
<ion-menu id=āleftMenuā [content]=ācontentā>
Doesnt work for me 
I want to disable swipe and enable whne I know someone is logged in
thanks worked like charm
that working ⦠and thanks ā¦
it works
thanksā¦
Note, itās important to use ionViewWillEnter and not ionViewDidEnter, to ensure that the view events are captured in the right order. If you use DidLeave and DidEnter, you could find that page 1ās DidLeave may fire after page 2ās DidEnter, with the net result that the side menu is incorrectly left enabled by the page 1 code.
Hi there⦠iām trying to close the menu in a desktop view⦠but this do not work⦠it always show up the menu⦠this make the menu closed just when mobile views (smaller sizes)
The enable false works⦠but removes the hamburguer button to open it again⦠the close does not close at all
What i tested
this.menuCtrl.swipeEnable(false);
this.menuCtrl.enable(false); ```
forget about it⦠my bad⦠was using a split pane component
Iāve solved this with this line in my login constructor :
this.menu.enable(false);
Thanks this worked for me ! 
Dear @brandyshea,
This is Fausto from Italy and I recently follow your old but gold notices, long my first approach in Ionic.
In particular Iām focus on the routing. Really hard for me to understand⦠well in order to your replay concerning the sidemenu visibility, I really appreciate if you can suggest me something about my case.
import { NgModule } from ā@angular/coreā;
import { MenuController } from ā@ionic/angularā;
import { PreloadAllModules, RouterModule, Routes } from ā@angular/routerā;
const routes: Routes = [
{
path: āā,
redirectTo: āloginā,
pathMatch: āfullā
},
{
path: ādashboardā,
loadChildren: () => import(ā./pages/dashboard/dashboard.moduleā).then( m => m.DashboardPageModule)
},
{
path: ālista-clientiā,
loadChildren: () => import(ā./pages/lista-clienti/lista-clienti.moduleā).then( m => m.ListaClientiPageModule)
},
{
path: āuser-profileā,
loadChildren: () => import(ā./pages/user-profile/user-profile.moduleā).then( m => m.UserProfilePageModule)
},
{
path: ātemplatesā,
loadChildren: () => import(ā./pages/templates/templates.moduleā).then( m => m.TemplatesPageModule)
},
{
path: āsupport-requestā,
loadChildren: () => import(ā./pages/support-request/support-request.moduleā).then( m => m.SupportRequestPageModule)
},
{
path: āloginā,
loadChildren: () => import(ā./pages/login/login.moduleā).then( m => m.LoginPageModule)
}
];
@NgModule({
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
],
exports: [RouterModule]
})
export class AppRoutingModule {}
How i can solve this tricky�