diff --git a/snippets/js-templates.cson b/snippets/js-templates.cson index 994057d..61d0b9b 100644 --- a/snippets/js-templates.cson +++ b/snippets/js-templates.cson @@ -180,12 +180,12 @@ "prefix": "nghttp" "body": """ $http({method: '${1:GET}', url: '$2'}) - .success(function(data, status, headers, config) { - $3 - }) - .error(function(data, status, headers, config) { - $4 - }); + .then(function successCallback(data, status, headers, config) { + $3 + }, + function errorCallback(data, status, headers, config) { + $4 + }); """ "copy": "prefix": "ngcopy"