My root page is a Login page, look my app.component.ts:
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from 'ionic-native';
import { Login } from './../pages/login/login';
@Component({
template: `<ion-nav [root]="rootPage"></ion-nav>`
})
export class MyApp {
rootPage = Login;
constructor(platform: Platform) {
platform.ready().then(() => {
StatusBar.styleDefault();
});
}
}
My Login page send me to the MessageList page, in this page Iād like to use a menu. Look the MessageList html:
<ion-menu [content]="mycontent">
<ion-content>
<ion-list>
<ion-item>A</ion-item>
<ion-item>B</ion-item>
</ion-list>
</ion-content>
</ion-menu>
<ion-nav #mycontent></ion-nav>
<ion-header>
<ion-navbar hideBackButton="true">
<button ion-button menuToggle>
<ion-icon name='menu'></ion-icon>
</button>
<ion-title>Telmi!</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-refresher (ionRefresh)="doRefresh($event)">
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
<ion-list inset>
<ion-item *ngFor="let m of messages" (click)="messageSelected(m)">
{{m.subject}}
</ion-item>
</ion-list>
</ion-content>
But the button to toggle the menu is not appearing.
Whatās the best way to use menu in a Ionic 2 project?