You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ We provide also three samples :
78
78
|'controller-as-route': 2 | You should use Angular's controllerAs syntax when defining routes or states. Implements route part [Y031](https://github.com/johnpapa/angular-styleguide#style-y031) |
79
79
| 'controller-as-vm': [2, 'vm'] | You should use a capture variable for 'this' when using the controllerAs syntax. [Y031](https://github.com/johnpapa/angular-styleguide#style-y032). The second parameter specifies the capture variable you want to use in your application. The third parameter can be a Regexp for identifying controller functions (when using something like Browserify) |
80
80
| 'controller-name': [2, /[A-Z].*Controller$/] | All your controllers should have a name starting with the parameter you can define in your config object. The second parameter can be a Regexp wrapped in quotes. ("controller-name": [2, "ng"]) [Y123](https://github.com/johnpapa/angular-styleguide#style-y123), [Y124](https://github.com/johnpapa/angular-styleguide#style-y124)|
81
-
| 'deferred':0 | When you want to create a new promise, you should not use the $q.deferred anymore. Prefer the new syntax : $q(function(resolve, reject){})
81
+
| 'deferred':0 | When you want to create a new promise, you should not use the $q.deferred anymore. Prefer the new syntax : $q(function(resolve, reject){}) |
82
82
| 'definedundefined': 2 | You should use the angular.isUndefined or angular.isDefined methods instead of using the keyword undefined. We also check the use of !angular.isUndefined and !angular.isDefined (should prefer the reverse function)|
83
83
| 'di': [2, 'function'] | All your DI should use the same syntax : the Array or function syntaxes ("di": [2, "function or array"])|
84
84
| 'di-order': [0, true] | Injected dependencies should be sorted alphabetically. If the second parameter is set to false, values which start and end with an underscore those underscores are stripped. This means for example that `_$httpBackend_` goes before `_$http_`. |
@@ -95,7 +95,7 @@ We provide also three samples :
95
95
| 'module-getter':2 | When using a module, avoid using a variable and instead use chaining with the getter syntax [Y022](https://github.com/johnpapa/angular-styleguide#style-y022)|
96
96
| 'module-name': 0 | When you create a new module, its name should start with the parameter you can define in your config object. The second parameter can be a Regexp wrapped in quotes. You can not prefix your modules by "ng" (reserved keyword for AngularJS modules) ("module-name": [2, "ng"]) [Y127](https://github.com/johnpapa/angular-styleguide#style-y127)|
97
97
| 'module-setter':2 | Declare modules without a variable using the setter syntax.[Y021](https://github.com/johnpapa/angular-styleguide#style-y021) |
98
-
| 'no-angular-mock':0 | All methods defined in the angular.mock object are also available in the object window. So you can remove angular.mock from your code
98
+
| 'no-angular-mock':0 | All methods defined in the angular.mock object are also available in the object window. So you can remove angular.mock from your code |
99
99
| 'no-controller': 0 | According to the Component-First pattern, we should avoid the use of AngularJS controller. |
100
100
| 'no-cookiestore':2 | In Angular 1.4, the $cookieStore service is now deprected. Please use the $cookies service instead|
101
101
| 'no-digest': 2 | DEPRECATED! The scope's $digest() method shouldn't be used. You should prefer the $apply method. |
@@ -104,7 +104,7 @@ We provide also three samples :
104
104
|'no-service-method': 2 | You should prefer the factory() method instead of service() [Y040](https://github.com/johnpapa/angular-styleguide#style-y040)|
105
105
|'no-services': [2, ['$http', '$resource', 'Restangular']] | Some services should be used only in a specific AngularJS service (Ajax-based service forexample),in order to follow the separation of concerns paradigm. The second parameter specifies the services. The third parameter can be a list of angular objects (controller, factory, etc.). Or second parameter can be an object, where keys are angular object names and value is a list of services (like {controller: ['$http'], factory: ['$q']}) |
106
106
|'on-watch': 2 | Watch and On methods on the scope object should be assigned to a variable, in order to be deleted in a $destroy event handler |
107
-
|'rest-service': 0 | Check the service used to send request to your REST API. This rule can have one parameter, with one of the following values: $http, $resource or Restangular ('rest-service': [0, '$http']).
107
+
|'rest-service': 0 | Check the service used to send request to your REST API. This rule can have one parameter, with one of the following values: $http, $resource or Restangular ('rest-service': [0, '$http']).|
108
108
|'service-name': 2 | All your services should have a name starting with the parameter you can define in your config object. The second parameter can be a Regexp wrapped in quotes. You can not prefix your services by "$" (reserved keyword for AngularJS services) ("service-name": [2, "ng"]) [Y125](https://github.com/johnpapa/angular-styleguide#style-y125) |
109
109
|'timeout-service': 2 | Instead of the default setTimeout function, you should use the AngularJS wrapper service $timeout [Y181](https://github.com/johnpapa/angular-styleguide#style-y181) |
110
110
|'typecheck-array': 2 | You should use the angular.isArray method instead of the default JavaScript implementation (typeof [] === "[object Array]"). |
0 commit comments