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;