|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!DOCTYPE codetemplates PUBLIC "-//NetBeans//DTD Editor Code Templates settings 1.0//EN" "http://www.netbeans.org/dtds/EditorCodeTemplates-1_0.dtd"> |
| 3 | +<codetemplates> |
| 4 | + <codetemplate abbreviation="ngcontroller" xml:space="preserve"> |
| 5 | + <code><![CDATA[(function() { |
| 6 | + 'use strict'; |
| 7 | +
|
| 8 | + angular |
| 9 | + .module('${module}', []) |
| 10 | + .controller('${Controller}', ${Controller}); |
| 11 | +
|
| 12 | + ${Controller}.$inject = ['${dependencies}']; |
| 13 | +
|
| 14 | + /* @ngInject */ |
| 15 | + function ${Controller}(${dependencies}){ |
| 16 | + var vm = this; |
| 17 | + vm.${property} = '${Controller}'; |
| 18 | + ${cursor} |
| 19 | +
|
| 20 | + activate(); |
| 21 | +
|
| 22 | + //////////////// |
| 23 | +
|
| 24 | + function activate() { |
| 25 | + } |
| 26 | + } |
| 27 | +})();]]></code> |
| 28 | + <description><![CDATA[Controller]]></description> |
| 29 | + </codetemplate> |
| 30 | + <codetemplate abbreviation="ngstate" xml:space="preserve"> |
| 31 | + <code><![CDATA[.state('${state}', { |
| 32 | + url: '${/url}' |
| 33 | + templateUrl: '${template}.html', |
| 34 | + controller: '${Controller}' |
| 35 | + controllerAs: '${vm}' |
| 36 | +})${6:}]]></code> |
| 37 | + <description><![CDATA[UI-Router state]]></description> |
| 38 | + </codetemplate> |
| 39 | + <codetemplate abbreviation="ngvalue" xml:space="preserve"> |
| 40 | + <code><![CDATA[.value('${name}', ${value});]]></code> |
| 41 | + <description><![CDATA[Value]]></description> |
| 42 | + </codetemplate> |
| 43 | + <codetemplate abbreviation="ngtranslate" xml:space="preserve"> |
| 44 | + <code><![CDATA[$translate(['${key1}']).then(function(translations){ |
| 45 | + ${value} = translations['${key1}']; |
| 46 | +});]]></code> |
| 47 | + <description><![CDATA[$translate service]]></description> |
| 48 | + </codetemplate> |
| 49 | + <codetemplate abbreviation="ngdirective" xml:space="preserve"> |
| 50 | + <code><![CDATA[(function () { |
| 51 | + 'use strict'; |
| 52 | +
|
| 53 | + angular |
| 54 | + .module('${module}',[]) |
| 55 | + .directive('${directive}', ${directive}); |
| 56 | +
|
| 57 | + ${directive}.$inject = ['${dependencies}']; |
| 58 | +
|
| 59 | + /* @ngInject */ |
| 60 | + function ${directive}(${dependencies}) { |
| 61 | + // Usage: |
| 62 | + // |
| 63 | + // Creates: |
| 64 | + // |
| 65 | + var directive = { |
| 66 | + bindToController: true, |
| 67 | + controller: ${Controller}, |
| 68 | + controllerAs: '${vm}', |
| 69 | + link: link, |
| 70 | + restrict: 'A', |
| 71 | + scope: {} |
| 72 | + }; |
| 73 | + return directive; |
| 74 | +
|
| 75 | + function link(scope, element, attrs, controller) { |
| 76 | + ${cursor} |
| 77 | + } |
| 78 | + } |
| 79 | +
|
| 80 | + ${Controller}.$inject = ['${dependencies}']; |
| 81 | +
|
| 82 | + /* @ngInject */ |
| 83 | + function ${Controller}(${dependencies}) { |
| 84 | + } |
| 85 | +})();]]></code> |
| 86 | + <description><![CDATA[Directive]]></description> |
| 87 | + </codetemplate> |
| 88 | + <codetemplate abbreviation="ngmodule" xml:space="preserve"> |
| 89 | + <code><![CDATA[angular |
| 90 | + .module('${module}')${cursor}]]></code> |
| 91 | + <description><![CDATA[Module getter]]></description> |
| 92 | + </codetemplate> |
| 93 | + <codetemplate abbreviation="ngwhen" xml:space="preserve"> |
| 94 | + <code><![CDATA[.when('/${url}', { |
| 95 | + templateUrl: '${template}.html', |
| 96 | + controller: '${Controller}', |
| 97 | + controllerAs: '${vm}' |
| 98 | +})${cursor}]]></code> |
| 99 | + <description><![CDATA[ngRoute 'when']]></description> |
| 100 | + </codetemplate> |
| 101 | + <codetemplate abbreviation="ngrun" xml:space="preserve"> |
| 102 | + <code><![CDATA[.run(${runFn}) |
| 103 | +
|
| 104 | +${runFn}.$inject = ['${dependencies}']; |
| 105 | +
|
| 106 | +/* @ngInject */ |
| 107 | +function ${runFn} (${dependencies}) { |
| 108 | + ${cursor} |
| 109 | +}]]></code> |
| 110 | + <description><![CDATA[Run phase function]]></description> |
| 111 | + </codetemplate> |
| 112 | + <codetemplate abbreviation="ngapp" xml:space="preserve"> |
| 113 | + <code><![CDATA[(function () { |
| 114 | + 'use strict'; |
| 115 | +
|
| 116 | + angular |
| 117 | + .module('${module}', [ |
| 118 | + '${dependencies}' |
| 119 | + ]); |
| 120 | +})();]]></code> |
| 121 | + <description><![CDATA[Module definition]]></description> |
| 122 | + </codetemplate> |
| 123 | + <codetemplate abbreviation="ngservice" xml:space="preserve"> |
| 124 | + <code><![CDATA[(function () { |
| 125 | + 'use strict'; |
| 126 | +
|
| 127 | + angular |
| 128 | + .module('${module}',[]) |
| 129 | + .service('${Service}', ${Service}); |
| 130 | +
|
| 131 | + ${Service}.$inject = ['${dependencies}']; |
| 132 | +
|
| 133 | + /* @ngInject */ |
| 134 | + function ${Service}(${dependencies}) { |
| 135 | + this.${func} = ${func}; |
| 136 | +
|
| 137 | + //////////////// |
| 138 | +
|
| 139 | + function ${func}() { |
| 140 | + ${cursor} |
| 141 | + } |
| 142 | + } |
| 143 | +})();]]></code> |
| 144 | + <description><![CDATA[Service]]></description> |
| 145 | + </codetemplate> |
| 146 | + <codetemplate abbreviation="ngconfig" xml:space="preserve"> |
| 147 | + <code><![CDATA[.config(${configuration}) |
| 148 | +
|
| 149 | +${configuration}.$inject = ['${dependencies}']; |
| 150 | +
|
| 151 | +/* @ngInject */ |
| 152 | +function ${configuration} (${dependencies}) { |
| 153 | + ${cursor} |
| 154 | +}]]></code> |
| 155 | + </codetemplate> |
| 156 | + <codetemplate abbreviation="ngfilter" xml:space="preserve"> |
| 157 | + <code><![CDATA[(function () { |
| 158 | + 'use strict'; |
| 159 | +
|
| 160 | + angular |
| 161 | + .module('${module}',[]) |
| 162 | + .filter('${filter}', ${filter}); |
| 163 | +
|
| 164 | + function ${filter}() { |
| 165 | + ${cursor} |
| 166 | + return ${filter}Filter; |
| 167 | +
|
| 168 | + //////////////// |
| 169 | +
|
| 170 | + function ${filter}Filter(${parameters}) { |
| 171 | + return ${parameters}; |
| 172 | + }; |
| 173 | + } |
| 174 | +})();]]></code> |
| 175 | + <description><![CDATA[Filter]]></description> |
| 176 | + </codetemplate> |
| 177 | + <codetemplate abbreviation="ngfactory" xml:space="preserve"> |
| 178 | + <code><![CDATA[(function () { |
| 179 | + 'use strict'; |
| 180 | + angular |
| 181 | + .module('${module}',[]) |
| 182 | + .factory('${factory}', ${factory}); |
| 183 | +
|
| 184 | + ${factory}.$inject = ['${dependencies}']; |
| 185 | +
|
| 186 | + /* @ngInject */ |
| 187 | + function ${factory}(${dependencies}){ |
| 188 | + var exports = { |
| 189 | + ${func}: ${func} |
| 190 | + }; |
| 191 | + ${cursor} |
| 192 | +
|
| 193 | + return exports; |
| 194 | +
|
| 195 | + //////////////// |
| 196 | +
|
| 197 | + function ${func}() { |
| 198 | + |
| 199 | + } |
| 200 | + } |
| 201 | +})();]]></code> |
| 202 | + <description><![CDATA[Factory]]></description> |
| 203 | + </codetemplate> |
| 204 | + <codetemplate abbreviation="ngconst" xml:space="preserve"> |
| 205 | + <code><![CDATA[.constant('${name}', ${value});]]></code> |
| 206 | + <description><![CDATA[Constant]]></description> |
| 207 | + </codetemplate> |
| 208 | +</codetemplates> |
0 commit comments