I have problem with ionic loader. When i try to use loader 2 times in same page it throws error “Cannot read property ‘nativeElement’ of null”
I Have done the following code:
this.loaderOptions = { content: "Please wait...", spinner: "dots", dismissOnPageChange: true }
this.loader = this.loadingCtrl.create(this.loaderOptions);
showLoader() {
this.loader.present();
}
hideLoader() {
setTimeout(() => {
this.loader.dismiss();
}, 4000);
}
And i called this methods when i want to display loader.
Plaese advise what i done wrong?