Button directed to page visited

0
Good afternoon. I have a problem with ionic, I have a button that is pointing to my home page. Being that when I direct, the Home Page appears as if I was already visited, the little set to return. What I want is for her to come back and start the same home.

My template:

    Quit Application   

Your Data: < / h3 >  Hits: {{hit}} Errors: {{errors}} < / h4 > Points: {{}} < / h5 > - >

Are you sure you want to quit ?

  Yes

  Not

* If you choose to leave, you will lose all your points and it will be   directed to the home page.

My ts:

import {HomePage} from './../home/home'; import {Component} from '@ angular / core'; import {IonicPage, NavController, NavParams, ModalController, ViewController, LoadingController} from 'ionic-angular';

/ **  * Generated class for the ModalfinalPage page.  *  * See link for more info on  * Ionic pages and navigation.  * /

@IonicPage () @Component ({   selector: 'page-modalfinal',   templateUrl: 'modalfinal.html', }) export class ModalfinalPage {

constructor (public navCtrl: NavController, public navParams: NavParams,     public modalCtrl: ModalController, public loadingCtrl: LoadingController,     public viewCtrl: ViewController) {   }

public closeModal () {     this.viewCtrl.dismiss ();   }

home () {     this.navCtrl.push (HomePage);     }

ionViewDidLoad () {     console.log ('ionViewDidLoad ModalfinalPage');   }

}

    
asked by anonymous 06.06.2018 / 23:04

1 answer

0

try to go to the root page, instead of:

home(){ this.navCtrl.push(HomePage); }

Try:

   home(){ this.navCtrl.setRoot(HomePage); }
    
20.06.2018 / 03:33