feat(menu): close any opened menu

This commit is contained in:
Adam Bradley
2016-02-15 19:42:11 -06:00
parent 84cf9cee65
commit c02fb51d04
3 changed files with 33 additions and 13 deletions

View File

@@ -37,10 +37,12 @@ class Page2 {
templateUrl: 'main.html'
})
class E2EApp {
rootPage;
changeDetectionCount: number = 0;
pages: Array<{title: string, component: any}>;
constructor(private app: IonicApp, private menu: MenuController) {
this.rootView = Page1;
this.changeDetectionCount = 0;
this.rootPage = Page1;
this.pages = [
{ title: 'Page 1', component: Page1 },
@@ -56,7 +58,7 @@ class E2EApp {
nav.setRoot(page.component).then(() => {
// wait for the root page to be completely loaded
// then close the menu
this.menu.close('left');
this.menu.close();
});
}

View File

@@ -138,6 +138,6 @@
</ion-menu>
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
<ion-nav id="nav" [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
<div [hidden]="isChangeDetecting()"></div>