From 2b31feaf15f292aa13b39b7d94150823273368e2 Mon Sep 17 00:00:00 2001 From: Rodolfo Silva Date: Mon, 15 May 2017 21:08:22 -0300 Subject: [PATCH] =?UTF-8?q?Resolve=20problema=20com=20o=20bot=C3=A3o=20vol?= =?UTF-8?q?tar=20#22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/menu/menu.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/menu/menu.ts b/src/pages/menu/menu.ts index 6c8bd54..15b188c 100644 --- a/src/pages/menu/menu.ts +++ b/src/pages/menu/menu.ts @@ -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() @@ -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(); } }