Olá, quando clico no button do Menu, está aparecendo o seguinte erro: Uncaught (in promise): false
Meu código da app.component.ts é esse:
import { Component, ViewChild } from '@angular/core';
import { Platform, Nav } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import { HomePage } from '../pages/home/home';
import { AgendamentosPage } from '../pages/agendamentos/agendamentos';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) public nav: Nav;
rootPage = HomePage;
public paginas = [
{ titulo: 'Agendamentos', componente: 'AgendamentosPage' },
];
constructor(platform: Platform) {
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();
Splashscreen.hide();
});
}
abrePagina(pagina): void {
this.nav.push(pagina.componente);
}
}
HTML:
<ion-menu [content]="content">
<ion-header>
<ion-toolbar>
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<button menuClose ion-item
*ngFor="let pagina of paginas"
(click)="abrePagina(pagina)">
{{pagina.titulo}}
</button>
</ion-list>
</ion-content>
</ion-menu>
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>