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'); }
}