Skip to content

Commit 6cf3d21

Browse files
committed
fix(sidemenu): Disables right menu on start
1 parent f641aa3 commit 6cf3d21

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/app/app.component.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AppState } from './app.global';
22
import { Component, ViewChild } from '@angular/core';
3-
import { Nav, Platform } from 'ionic-angular';
3+
import { Nav, Platform, MenuController } from 'ionic-angular';
44
import { StatusBar } from '@ionic-native/status-bar';
55
import { SplashScreen } from '@ionic-native/splash-screen';
66
import { Subject } from 'rxjs';
@@ -18,7 +18,13 @@ export class MyApp {
1818
rightMenuItems: Array<{ icon: string, active: boolean }>;
1919
state: any;
2020

21-
constructor(public platform: Platform, public statusBar: StatusBar, public splashscreen: SplashScreen, public global: AppState) {
21+
constructor(
22+
public platform: Platform,
23+
public statusBar: StatusBar,
24+
public splashscreen: SplashScreen,
25+
public global: AppState,
26+
public menuCtrl: MenuController
27+
) {
2228
this.initializeApp();
2329
this.rightMenuItems = [
2430
{ icon: 'home', active: true },
@@ -64,6 +70,7 @@ export class MyApp {
6470
// Here you can do any higher level native things you might need.
6571
this.statusBar.styleDefault();
6672
this.splashscreen.hide();
73+
this.menuCtrl.enable(false, 'right');
6774
});
6875
}
6976

0 commit comments

Comments
 (0)