Exactly what title says. The side-menu works on Android and Windows version of the app but not on iOS version.
@App({
template: `
<ion-menu [content]="content" #myMenu>
<ion-toolbar primary>
<ion-title>
Settings
</ion-title>
</ion-toolbar>
<ion-content>
<ion-list>
<button *ngFor="#menuPage of menuPages" ion-item (click)="openPage(menuPage.page)">
{{menuPage.name}}
</button>
<button ion-item menuClose>
Close
</button>
</ion-list>
</ion-content>
</ion-menu>
<ion-nav #content [root]="rootPage"></ion-nav>
`
export class MyApp {
constructor(_platform: Platform, _app: IonicApp) {
_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.
// StatusBar.styleDefault();
this.menu.enable(false);
});
this.app = _app;
}
menuPages: any[] = [
{ name: 'Store', page: StoreName },
{ name: 'Discounts', page: Discounts },
{ name: 'Taxes', page: Taxes },
{ name: 'Currency', page: Currency }
];
rootPage: any = Login;
app: IonicApp;
@ViewChild(Nav) nav;
@ViewChild('myMenu') menu: Menu;
openPage(page): void {
this.nav.push(page);
this.menu.close();
}
}