Skip to content

Commit

Permalink
Merge pull request #33 from RodolfoSilva/fix-22-botao-voltar
Browse files Browse the repository at this point in the history
Resolve problema com o botão voltar fix #22
  • Loading branch information
RodolfoSilva authored May 16, 2017
2 parents 0f5490a + 2b31fea commit ea12612
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/pages/menu/menu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { ViewController, NavController, IonicPage } from 'ionic-angular';
import { App, ViewController, NavController, IonicPage } from 'ionic-angular';


@IonicPage()
Expand All @@ -10,18 +10,22 @@ import { ViewController, NavController, IonicPage } from 'ionic-angular';
export class MenuPage {
options: Array<{ component: string, title: string }>;

constructor(public viewCtrl: ViewController, public navCtrl: NavController) {
constructor(
public app: App,
public viewCtrl: ViewController,
public navCtrl: NavController
) {
this.options = [
{ component: 'SobrePage', title: 'Sobre o projeto' },
]
}

goToPage(page: string) {
this.navCtrl.push(page);
this.app.getRootNav().push(page);
this.close();
}

close() {
this.viewCtrl.dismiss();
return this.viewCtrl.dismiss();
}
}

0 comments on commit ea12612

Please # to comment.