I'm struggling to programmatically dismiss the loader.
I've developed two separate methods - one for displaying the loader and another for dismissing it. These methods are called accordingly when needed.
async showLoader() {
this.loader = await this.loadingCtrl.create({
message: "Please Wait"
})
await this.loader.present();
}
async hideLoader() {
this.loader = await this.loadingCtrl.dismiss();
}
I prefer not to use a duration as an option to dismiss the loader.