param dismissOnPageChange: true will Raise the error at the first time i present NavController
chrome console error
ts
export class ContactPage {
constructor(
public navCtrl: NavController,
private loadingCtrl: LoadingController,
) { }
presentLoading() {
let loading = this.loadingCtrl.create({
content: "Please wait...",
dismissOnPageChange: true
});
loading.present();
setTimeout(() => {
loading.dismiss();
}, 2000);
}
}
html
<ion-content><button ion-button (click)="presentLoading()">presentLoading()</button></ion-content>