Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 06bd685

Browse files
committed
Merge pull request #46 from yusiswtor/master
Update js-templates.cson (fix deprecated promise usage)
2 parents 29e2830 + b76383e commit 06bd685

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

snippets/js-templates.cson

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@
180180
"prefix": "nghttp"
181181
"body": """
182182
$http({method: '${1:GET}', url: '$2'})
183-
.success(function(data, status, headers, config) {
184-
$3
185-
})
186-
.error(function(data, status, headers, config) {
187-
$4
188-
});
183+
.then(function successCallback(data, status, headers, config) {
184+
$3
185+
},
186+
function errorCallback(data, status, headers, config) {
187+
$4
188+
});
189189
"""
190190
"copy":
191191
"prefix": "ngcopy"

0 commit comments

Comments
 (0)