Skip to content

Commit 8b4787c

Browse files
committed
fix(docs): fix section explaining generating services
1 parent 8404c06 commit 8b4787c

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

readme.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -145,27 +145,12 @@ yo angular:service myService
145145

146146
Produces `app/scripts/services/myService.js`:
147147
```javascript
148-
angular.module('myMod').factory('myService', function () {
148+
angular.module('myMod').service('myService', function () {
149149
// ...
150150
});
151151
```
152152

153-
#### Options
154-
There are options for each of the methods for registering services. For more on using these services, see the [module API AngularJS documentation](http://docs.angularjs.org/api/angular.Module).
155-
156-
##### Factory
157-
Invoked with `--factory`
158-
159-
This is the default method when creating a service. Running `yo angular:service myService --factory` is the same as running `yo angular:service myService`
160-
161-
##### Service
162-
Invoked with `--service`
163-
164-
##### Value
165-
Invoked with `--value`
166-
167-
##### Constant
168-
Invoked with `--constant`
153+
You can also do `yo angular:factory`, `yo angular:provider`, `yo angular:value`, and `yo angular:constant` for other types of services.
169154

170155
## Options
171156
In general, these options can be applied to any generator, though they only affect generators that produce scripts.

0 commit comments

Comments
 (0)