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

Commit 8e3241e

Browse files
author
Steve Hansell
committed
Improvements to Atom conversion.
1 parent e91f0c5 commit 8e3241e

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

snippets/angularjs.cson

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
'.source.js, .source.coffee':
22
'$apply':
33
'prefix': '.$'
4-
'body': '.\\$apply($0)$TM_JAVASCRIPT_TERMINATOR'
4+
'body': '.$apply($0);'
55
'$broadcast':
66
'prefix': '.$'
7-
'body': '.\\$broadcast(\'${1:name}\', ${2:arguments})$TM_JAVASCRIPT_TERMINATOR'
7+
'body': '.$broadcast(\'${1:name}\', ${2:arguments});'
88
'$destroy':
99
'prefix': '.$'
10-
'body': '.\\$destroy()$TM_JAVASCRIPT_TERMINATOR'
10+
'body': '.$destroy();'
1111
'$digest':
1212
'prefix': '.$'
13-
'body': '.\\$digest()$TM_JAVASCRIPT_TERMINATOR'
13+
'body': '.$digest();'
1414
'$emit':
1515
'prefix': '.$'
16-
'body': '.\\$emit(\'${1:name}\', ${2:arguments})$TM_JAVASCRIPT_TERMINATOR'
16+
'body': '.$emit(\'${1:name}\', ${2:arguments});'
1717
'$eval':
1818
'prefix': '.$'
19-
'body': '.\\$eval($0)$TM_JAVASCRIPT_TERMINATOR'
19+
'body': '.$eval($0);'
2020
'$evalAsync':
2121
'prefix': '.$'
22-
'body': '.\\$evalAsync($0)$TM_JAVASCRIPT_TERMINATOR'
22+
'body': '.$evalAsync($0);'
2323
'$new':
2424
'prefix': '.$'
25-
'body': '.\\$new(${1:isolate})$TM_JAVASCRIPT_TERMINATOR'
25+
'body': '.$new(${1:isolate});'
2626
'$on':
2727
'prefix': '.$'
28-
'body': '.\\$on(\'${1:name}\', ${2:function(){$3}})$TM_JAVASCRIPT_TERMINATOR'
28+
'body': '.$on(\'${1:name}\', ${2:function(){$3}});'
2929
'$parent':
3030
'prefix': '.$'
31-
'body': '.\\$parent.'
31+
'body': '.$parent.'
3232
'$root':
3333
'prefix': '.$'
34-
'body': '.\\$root.'
34+
'body': '.$root.'
3535
'$watch':
3636
'prefix': '.$'
37-
'body': '.\\$watch(\'${1:name}\', function(scope, newValue, oldValue) {\n\t$0\n})$TM_JAVASCRIPT_TERMINATOR'
37+
'body': '.$watch(\'${1:name}\', function(scope, newValue, oldValue) {\n\t$0\n});'
3838
'$http':
3939
'prefix': 'http'
40-
'body': '\\$http(\'${1:GET|POST|PUT|DELETE}\', ${2:url}${3:, ${4:post}}, ${5:function(status, response){\n\t${6:// success}\n}}${7:, function(status, response){\n\t${8:// error}\n}})$TM_JAVASCRIPT_TERMINATOR'
40+
'body': '$http(\'${1:GET|POST|PUT|DELETE}\', ${2:url}${3:, ${4:post}}, ${5:function(status, response){\n\t${6:// success}\n}}${7:, function(status, response){\n\t${8:// error}\n}});'
4141
'copy':
4242
'prefix': 'copy'
4343
'body': 'angular.copy(${1:source}${2:, ${3:destination}})'
4444
'directive':
4545
'prefix': 'dir'
46-
'body': 'directive(\'$1\', [${3:\'$4\', }function($4){\n\t${5:// Runs during compile}\n\treturn {\n\t\t// name: \'\',\n\t\t// priority: 1,\n\t\t// terminal: true,\n\t\t// scope: {}, // {} = isolate, true = child, false/undefined = no change\n\t\t// cont­rol­ler: function(\\$scope, \\$element, \\$attrs, \\$transclue) {},\n\t\t// require: \'ngModel\', // Array = multiple requires, ? = optional, ^ = check parent elements\n\t\t// restrict: \'A\', // E = Element, A = Attribute, C = Class, M = Comment\n\t\t// template: \'\',\n\t\t// templateUrl: \'\',\n\t\t// replace: true,\n\t\t// transclude: true,\n\t\t// compile: function(tElement, tAttrs, function transclude(function(scope, cloneLinkingFn){ return function linking(scope, elm, attrs){}})),\n\t\tlink: function(\\$scope, iElm, iAttrs, controller) {\n\t\t\t$0\n\t\t}\n\t};\n}])$TM_JAVASCRIPT_TERMINATOR'
46+
'body': 'directive(\'$1\', [${3:\'$4\', }function($4){\n\t${5:// Runs during compile}\n\treturn {\n\t\t// name: \'\',\n\t\t// priority: 1,\n\t\t// terminal: true,\n\t\t// scope: {}, // {} = isolate, true = child, false/undefined = no change\n\t\t// cont­rol­ler: function(\\$scope, \\$element, \\$attrs, \\$transclue) {},\n\t\t// require: \'ngModel\', // Array = multiple requires, ? = optional, ^ = check parent elements\n\t\t// restrict: \'A\', // E = Element, A = Attribute, C = Class, M = Comment\n\t\t// template: \'\',\n\t\t// templateUrl: \'\',\n\t\t// replace: true,\n\t\t// transclude: true,\n\t\t// compile: function(tElement, tAttrs, function transclude(function(scope, cloneLinkingFn){ return function linking(scope, elm, attrs){}})),\n\t\tlink: function(\\$scope, iElm, iAttrs, controller) {\n\t\t\t$0\n\t\t}\n\t};\n}]);'
4747
'element':
4848
'prefix': 'el'
49-
'body': 'angular.element(${1:element})$TM_JAVASCRIPT_TERMINATOR'
49+
'body': 'angular.element(${1:element});'
5050
'equals':
5151
'prefix': 'eq'
52-
'body': 'angular.equals(${1:object1}, ${2:object2})$TM_JAVASCRIPT_TERMINATOR'
52+
'body': 'angular.equals(${1:object1}, ${2:object2});'
5353
'extend':
5454
'prefix': 'extend'
5555
'body': 'angular.extend(${1:destinationObject}, ${2:sourceObject})'
5656
'$filter':
5757
'prefix': 'filter'
58-
'body': '\\$filter(\'${1:currency|date|filter|json|limitTo|linky|lowercase|number|orderBy|uppercase}\')(${2:array}${3:, ${4:expression}})$TM_JAVASCRIPT_TERMINATOR'
58+
'body': '$filter(\'${1:currency|date|filter|json|limitTo|linky|lowercase|number|orderBy|uppercase}\')(${2:array}${3:, ${4:expression}});'
5959
'forEach':
6060
'prefix': 'each'
61-
'body': 'angular.forEach(${1:values}, function(${2:value}, ${3:key}){\n\t$0\n})$TM_JAVASCRIPT_TERMINATOR'
61+
'body': 'angular.forEach(${1:values}, function(${2:value}, ${3:key}){\n\t$0\n});'
6262
'isArray':
6363
'prefix': 'is'
6464
'body': 'angular.isArray(${1:value})'
@@ -79,7 +79,7 @@
7979
'body': 'angular.isString(${1:value})'
8080
'lowercase':
8181
'prefix': 'lower'
82-
'body': 'angular.lowercase(${1:string})$TM_JAVASCRIPT_TERMINATOR'
82+
'body': 'angular.lowercase(${1:string});'
8383
'module':
8484
'prefix': 'mod'
8585
'body': '/**\n * $1 Module\n *\n * ${2:Description}\n */\nangular.module(\'$1\', [$3]).$0'
@@ -88,11 +88,11 @@
8888
'body': 'angular.noop'
8989
'uppercase':
9090
'prefix': 'upper'
91-
'body': 'angular.uppercase(${1:string})$TM_JAVASCRIPT_TERMINATOR'
91+
'body': 'angular.uppercase(${1:string});'
9292
'.js':
9393
'$routeProvider.when':
9494
'prefix': 'route'
95-
'body': '\\$routeProvider.when(\'$1\', {template: \'$2\', controller: $3})$TM_JAVASCRIPT_TERMINATOR'
95+
'body': '\\$routeProvider.when(\'$1\', {template: \'$2\', controller: $3});'
9696
'.text.html':
9797
'|currency':
9898
'prefix': '|'
@@ -121,7 +121,7 @@
121121
'|uppercase':
122122
'prefix': '|'
123123
'body': '|uppercase'
124-
'.text.html .meta.tag':
124+
'.text.html, .meta.tag':
125125
'ngRepeat':
126126
'prefix': 'repeat'
127127
'body': 'ng-repeat="${1:(${2:key}, ${3:value})} in ${4:dataset}"'

0 commit comments

Comments
 (0)