Skip to content

Commit

Permalink
Desabilitar menu na tela inicia
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscolopes committed May 3, 2018
1 parent 81ed115 commit 7b45776
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pages/home/home.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { NavController, IonicPage } from 'ionic-angular';
import { MenuController } from 'ionic-angular/components/app/menu-controller';

@IonicPage()
@Component({
Expand All @@ -8,10 +9,18 @@ import { NavController, IonicPage } from 'ionic-angular';
})
export class HomePage {

constructor(public navCtrl: NavController) {
constructor(public navCtrl: NavController, public menu: MenuController) {

}

ionViewWillEnter() {
this.menu.swipeEnable(false);
}

ionViewDidLeave() {
this.menu.swipeEnable(true);
}

login() {
this.navCtrl.setRoot('CategoriasPage');
}
Expand Down

0 comments on commit 7b45776

Please sign in to comment.