How can i create a little spinner who loads in the screen and not dissapears until the iframe it’s fully loaded?
I’m using jquery in a lot of elements and i want to show that if the iframe is loading… I think i can’t do it all in the same (load) because this load will close too much fast
I tried with this but it doesn’t works:
<ion-content>
<iframe name="chatFrame" src="http://..." (load)="dismissLoading()"></iframe>
</ion-content>
And in your component class :
loading;
ngOnInit() {
this.presentLoading();
}
presentLoading() {
this.loading = this.loadingCtrl.create({
content: 'Please wait...'
});
loading.present();
}
dismissLoading(){
this.loading.dismiss();
}
Note - You can call the showLoading() function as many time you want. And this will add overlay screen on top of another. So make sure to close/dismiss previous one.