From eb7cd798b0b811de24ec25e20a18d91a776aced7 Mon Sep 17 00:00:00 2001 From: arnaucode Date: Wed, 1 Feb 2017 23:47:43 +0100 Subject: [PATCH] alert when new travel has empty required params --- www/js/offerCar.js | 4 +++- www/templates/offerCar.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/www/js/offerCar.js b/www/js/offerCar.js index ed00692..2e8199b 100644 --- a/www/js/offerCar.js +++ b/www/js/offerCar.js @@ -1,7 +1,7 @@ angular.module('app.offerCar', ['pascalprecht.translate', 'ui-leaflet']) .controller('OfferCarCtrl', function($scope, $stateParams, $translate, - $http, $filter) { + $http, $filter, $ionicLoading) { $scope.newtravel={}; $scope.newtravel.from={ @@ -38,6 +38,8 @@ angular.module('app.offerCar', ['pascalprecht.translate', 'ui-leaflet']) function(data) { // optional // failed console.log(data); + $ionicLoading.show({ template: 'Complete all parameters first', noBackdrop: true, duration: 2000 }); + }); }; $scope.getGeo = function(){ diff --git a/www/templates/offerCar.html b/www/templates/offerCar.html index 02ec577..9f77068 100644 --- a/www/templates/offerCar.html +++ b/www/templates/offerCar.html @@ -38,7 +38,7 @@ - + {{'Can_carry_package' | translate}}