protractor#error TypeScript Examples
The following examples show how to use
protractor#error.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: add-service.page.ts From Uber-ServeMe-System with MIT License | 6 votes |
async saveProduct() {
await this.presentLoading();
this.homeService.vendorId = this.userService.getAuth().currentUser.uid;
console.log(this.homeService.vendorId)
if (this.homeSeviceId) {
try {
await this.homeServiceService.updateService(this.homeSeviceId, this.homeService);
await this.loading.dismiss();
this.presentToast('Update sucesss!');
this.navCtrl.navigateBack('/vendor');
} catch (error) {
this.presentToast('Error when trying to save');
this.loading.dismiss();
}
} else {
this.homeService.createdAt = new Date().getTime();
try {
await this.homeServiceService.addService(this.homeService);
await this.loading.dismiss();
this.presentToast('Save sucesss!');
this.navCtrl.navigateBack('/vendor');
} catch (error) {
this.presentToast('Error when trying to save');
this.loading.dismiss();
}
}
}