From 4f00b5ee582da9822eaf1faec9ea0499522ac2e2 Mon Sep 17 00:00:00 2001 From: Rivka Tzur Date: Thu, 5 Jan 2017 12:32:38 +0200 Subject: [PATCH] Update service.js change to then --- lib/templates/client/service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/templates/client/service.js b/lib/templates/client/service.js index 36bbe1a..01a9fe6 100644 --- a/lib/templates/client/service.js +++ b/lib/templates/client/service.js @@ -7,9 +7,9 @@ checkCircle: function(circle) { var deferred = $q.defer(); - $http.get('/api/__name__/example/' + circle).success(function(response) { + $http.get('/api/__name__/example/' + circle).then(function(response) { deferred.resolve(response); - }).error(function(response) { + }, function(response) { deferred.reject(response); }); return deferred.promise;