ionViewDidLoad() { let loading = this.loadingCtrl.create({ content: "Map is loading..." }); loading.present(); this.geolocation.getCurrentPosition().then((resp) => { console.log('abe to get cooord',resp) console.log("ionViewDidLoad DashboardPage"); this.dashboardService.list(resp.coords.latitude.toString(),resp.coords.longitude.toString()).subscribe( data => { loading.dismiss(); console.log(data["Response"]["View"][0]["Result"]); this.show = data["Response"]["View"][0]["Result"]; }, error => { loading.dismiss(); console.log('errorrrrr',error); } ); }).catch((error) => { loading.dismiss(); console.log('Error getting location', error); }); setTimeout(() => { console.log("Async operation has ended"); loading.dismiss(); }, 7000); }
login() { let loading = this.loadingCtrl.create({ content: "Please wait..." }); loading.present(); this.loginService.login(this.username, this.password).subscribe( data => { // this.statusBar.backgroundColorByHexString("#25312C") this.provider.token = data['token']; localStorage.setItem('token', this.provider.token); this.provider.userData = jwtDecode( data['token']); console.log(this.provider.userData) this.navCtrl.push(TabsPage); loading.dismiss(); }, error => { console.log(error) let alert = this.alertCtrl.create({ title: "Alert!", subTitle: "OOOOPS... Something Went Wrong", buttons: ["Dismiss"] }); loading.dismiss(); alert.present(); } ); }
content: "Please wait..." }); loading.present(); this.bookingService .listBookingByUser(this.provider.userData.data.USERID)
content: "Please wait..." }); loading.present(); this.odmService .getODM(src, dest, this.provider.userData.data.TIER, 30000) }); loading.dismiss(); alert3.present(); content: "Please wait..." }); loading.present(); this.bookingService .booking( alert2.present(); this.navCtrl.pop(); }, }); loading.dismiss(); alert3.present(); this.navCtrl.pop(); console.log(error); alert.present(); console.log("Archive clicked");
content: "Please wait..." }); loading.present(); this.bookingService .listBookingByUser(this.provider.userData.data.USERID)