I have an Ionic 2 app, I want to launch a model every 10 minutes. In app.components.ts
I have simple function to launch this model.
openUpgradeModel() {
let modal = this.modalCtrl.create(UpgradeToFullVersionModel);
modal.present();
}
How can I get that function to launch every 10 minutes or so?
Update, so I tried using an Observable.timer, however it loops over and over.
this.platform.ready().then(() => {
let timer = Observable.timer(2000,1000);
timer.subscribe(t=> {
UpgradeToFullVersionModel();
});
Is there anyway to tell if the model is already open don't fire?