Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
fix(docs): add decorator generator description
Browse files Browse the repository at this point in the history
Add decorator generator description to readme.md
  • Loading branch information
chicoxyzzy authored and passy committed Aug 8, 2013
1 parent 38a872b commit 85f0764
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Available generators:
* [angular:filter](#filter)
* [angular:route](#route)
* [angular:service](#service)
* [angular:decorator] (#decorator)
* [angular:view](#view)

**Note: Generators are to be run from the root directory of your app.**
Expand Down Expand Up @@ -146,6 +147,24 @@ angular.module('myMod').service('myService', function () {

You can also do `yo angular:factory`, `yo angular:provider`, `yo angular:value`, and `yo angular:constant` for other types of services.

### Decorator
Generates an AngularJS service decorator.

Example:
```bash
yo angular:decorator serviceName
```

Produces `app/scripts/decorators/serviceNameDecorator.js`:
```javascript
angular.module('myMod').config(function ($provide) {
$provide.decorator('serviceName', function ($delegate) {
// ...
return $delegate;
});
});
```

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

Expand Down

0 comments on commit 85f0764

Please sign in to comment.