<ion-menu [content]="content">
    <ion-header>
        <ion-toolbar>
            <ion-title>Menú</ion-title>
        </ion-toolbar>
    </ion-header>

    <ion-content>
        <ion-list inset>
            <button ion-item menuClose (click)="nav.setRoot(homePage)">
                <ion-icon color="primary" name="home" style="padding-right: 25px;"></ion-icon>
                Inicio
            </button>

            <div *ngFor="let e of (entries | menu: true)">
                <ion-list-header>{{ e.title }}</ion-list-header>
                <button ion-item menuClose *ngFor="let p of (e.pages | menu: true)" (click)="openPage(p)">
                    <ion-icon color="primary" name="{{ p.icon }}" style="padding-right: 25px;"></ion-icon>
                    {{ p.title }}
                </button>
            </div>
        </ion-list>
    </ion-content>
</ion-menu>

<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>