i’m trying to create a simple menu in the navbar with ionic2. but it’s not showing up i can’t seem to understand why. This is the current code i have: app.ts
import {App, Platform} from 'ionic-angular';
import {TabsPage} from './pages/tabs/tabs';
import {MenuPage} from './pages/menu/menu';
@App({
templateUrl: 'build/index.html',
config: {} // http://ionicframework.com/docs/v2/api/config/Config/
})
export class MyApp {
static get parameters() {
return [[Platform]];
}
constructor(platform) {
this.rootPage = TabsPage;
platform.ready().then(() => {
});
}
}
index.html:
<ion-nav #content [root]="rootPage"></ion-nav>
menu.ts:
import{Page, MenuController} from 'ionic-angular';
@Page({
templateUrl: 'build/pages/menu/menu.html'
})
export class MenuPage {
constructor(menu: MenuController) {
this.menu = menu;
}
openMenu() {
this.menu.open();
}
}
menu.html:
<ion-menu persistent="true" [content]="content">
<ion-toolbar>
<ion-title>Instellingen</ion-title>
</ion-toolbar>
<ion-content>
<ion-list>
<button ion-item>
Informatie
</button>
<button ion-item>
Veelgestelde vragen
</button>
<button ion-item>
Algemene Voorwaarden
</button>
</ion-list>
</ion-content>
</ion-menu>
No errors, i don’t see any problems view loads normally. Just no menu. Does someone know why this doesn’t work?