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

Commit 4b3197d

Browse files
committed
add a snippet for $timeout
close #79
1 parent b9b935d commit 4b3197d

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,13 @@ $scope.$watch('$1', function(newValue, oldValue) {
412412
});
413413
```
414414

415+
#### ngto
416+
```
417+
$timeout(function() {
418+
$2
419+
}, $1)
420+
```
421+
415422
##### ngc
416423
```
417424
var $1 = function($scope, $2) {

snippets/js-templates.cson

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@
149149
$2
150150
})
151151
"""
152+
"$timeout":
153+
"prefix": "ngto"
154+
"body": """
155+
$timeout(function() {
156+
$2
157+
}, $1)
158+
"""
152159
"controller":
153160
"prefix": "ngc"
154161
"body": """
@@ -181,11 +188,11 @@
181188
"body": """
182189
$http({method: '${1:GET}', url: '$2'})
183190
.then(function successCallback(data, status, headers, config) {
184-
$3
185-
},
186-
function errorCallback(data, status, headers, config) {
187-
$4
188-
});
191+
$3
192+
},
193+
function errorCallback(data, status, headers, config) {
194+
$4
195+
});
189196
"""
190197
"copy":
191198
"prefix": "ngcopy"

0 commit comments

Comments
 (0)