Hello, I get the error as 'Cannot read property 'enable' of undefined'
My sidemenu.ts code:
import {Page,NavController,NavParams,IonicApp,MenuController} from 'ionic-angular';
@Page({
templateUrl: 'build/pages/sidemenu/sidemenu.html'
})
export class SideMenu {
private nav,app,menu;
constructor(public platform: Platform, nav : NavController,public navParams: NavParams,app: IonicApp,menu: MenuController){
this.app = app;
this.menu = menu;
app.getComponent('leftMenu').enable(true);
}
}
My sidemenu.html code:
<ion-navbar *navbar hideBackButton>
<button menuToggle="leftMenu">
<ion-icon name='menu'></ion-icon>
</button>
<ion-title>Select an App</ion-title>
</ion-navbar>
What could be the issue for this? Please Help.
I think you must do : this.menu.open();