Having trouble with calling loading/Toast/Alert
in Ionic2
under the current scenario. Being a newcomer to Ionic development, I'm struggling to understand it. I realize it's a trivial mistake.
var dg = document.getElementById('btnregis');
dg.onclick =()=> this.presentLoading();
presentLoading() {
console.log("Registered");
let loading = Loading.create({
content: "Please wait...",
duration: 3000
});
this.navController.present(loading);
this.Reg_success();
}
Reg_success() {
console.log("registration success");
this.Billerlabelview = false;
let toast = Toast.create({
message: "Registering...",
duration: 3000
});
this.navController.present(toast);
}
The reg_Success()
function isn't being triggered. It results in a similar error. Could there be something that I'm overlooking?