Vote count: 0 I have HTTP service that retus promise to inspection2update.DamageTypeId property and continue to execute further. HTTP service: function post(objectTypeId, damageDescription) { var defer = $q.defer(); $http.post(serviceAddress + "save/" + objectTypeId + "/" + damageDescription).then(function (response) { defer.resolve(response.data); }); retu defer.promise; } Here how I call service in controller: inspection2update.DamageTypeId = damageTypesService.save(inspection2update.ObjectTypeId, self.dType); But I need to wait until I get data from service and only after it, to execute further. For this purpose I use $q service inside $http resolver, but still...
ادامه مطلب