File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2862,14 +2862,13 @@ Use file templates or snippets to help follow consistent styles and patterns. He
28622862 ngapp // creates an Angular module setter
28632863 ngservice // creates an Angular service
28642864 ngfilter // creates an Angular filter
2865- ngroute // creates an Angular routeProvider
28662865
28672866 // These are partial snippets intended to chained
28682867 ngmodule // creates an Angular module getter
28692868 ngstate // creates an Angular UI Router state defintion
28702869 ngconfig // defines a configuration phase function
28712870 ngrun // defines a run phase function
2872- ngwhen // defines a route for the routeProvider
2871+ ngroute // defines an Angular ngRoute 'when' definition
28732872 ` ` `
28742873
28752874**[Back to top](#table-of-contents)**
Original file line number Diff line number Diff line change 44 text : |
55 (function () {
66 'use strict';
7+
78 angular
89 .module('${1:module}')
910 .filter('${2:filter}', ${2:filter});
1011
11-
1212 function ${2:filter}() {
1313 return ${2:filter}Filter;
14+
1415 ////////////////
1516
1617 function ${2:filter}Filter(${3:parameters}) {
2526 text : |
2627 (function () {
2728 'use strict';
29+
2830 angular
2931 .module('${1:module}')
3032 .service('${2:Service}', ${2:Service});
5456 .module('${1:module}', [
5557 '${2:dependencies}'
5658 ]);
57-
5859 })();
5960
6061 - trigger : ngfactory
7879 return exports;
7980
8081 ////////////////
82+
8183 function ${4:func}() {
8284
8385 }
9193 (function () {
9294 'use strict';
9395
94-
9596 angular
9697 .module('${1:module}')
9798 .directive('${2:directive}', ${2:directive});
123124 function ${4:Controller}(${6:dependencies}) {
124125
125126 }
126-
127127 })();
128128
129129 - trigger : ngcontroller
149149 ////////////////
150150
151151 function activate() {
152+
152153 }
153154 }
154155 })();
155156
157+ - trigger : ngwhen
158+ description : " Angular ngRouter 'when' route using John Papa's Angular style guide"
159+ scope : javascript
160+ text : |
161+ .when('/${1:url}', {
162+ templateUrl: '${2:template}.html',
163+ controller: '${3:Controller}',
164+ controllerAs: '${4:vm}'
165+ })
166+
156167 - trigger : ngstate
157168 description : " Angular UI-Router state using John Papa's Angular style guide"
158169 scope : javascript
196207 function ${1:runFn} (${2:dependencies}) {
197208
198209 }
199-
200- - trigger : ngroute
201- description : " Angular routeProvider using John Papa's Angular style guide"
202- scope : javascript
203- mTime : 1426416190583
204- text : |
205- (function() {
206- 'use strict';
207-
208- angular
209- .module( '${1:app}' )
210- .config( function( $routeProvider ) {
211- $routeProvider
212- .when( '/', {
213- templateUrl: '${2:home}.html',
214- controller: '${3:Home}',
215- controllerAs: 'vm'
216- })
217-
218- });
219- })();
220-
221- - trigger : ngwhen
222- description : " Defines a route for routeProvider using John Papa's style guide"
223- scope : javascript
224- mTime : 1426416499728
225- text : |
226- .when( '/${1:home}', {
227- templateUrl: '${1:home}.html',
228- controller: '${2:Home}',
229- controllerAs: '${3:vm}'
230- })
231-
You can’t perform that action at this time.
0 commit comments