docs($provide): Decorator method in summary#14562
docs($provide): Decorator method in summary#14562ajaygm wants to merge 3 commits intoangular:masterfrom
Conversation
Added short description for decorator method and link to it in the summary section.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
1 similar comment
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
CLAs look good, thanks! |
1 similar comment
|
CLAs look good, thanks! |
src/auto/injector.js
Outdated
| * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class` | ||
| * that will be wrapped in a **service provider** object, whose `$get` property will instantiate | ||
| * a new object using the given constructor function. | ||
| * * {@link auto.$provide#decorator decorator(name)} - registers a **service decorator** with the |
There was a problem hiding this comment.
service decorator is not correct, as not only services can be decorated. You should call it decorator function. In the function signature, the decorator fn is also missing: decorator(name, decoratorFn)
Decorator function can decorate any type of provider not just services.
|
Hi @Narretz |
| * that will be wrapped in a **service provider** object, whose `$get` property will instantiate | ||
| * a new object using the given constructor function. | ||
| * * {@link auto.$provide#decorator decorator(name, decorFn)} - registers a **decorator function**, | ||
| * `decorFn`, with the {@link auto.$injector $injector}, `name` the name of the provider to decorate. |
There was a problem hiding this comment.
, name the name of the provider to decorate. -> ; name is the name of the provider to decorate.
|
@ajaygm Thanks for the update. I left a few notes. Can you also add a ink to the decorator guide in the detailed description before the example? |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Docs update
What is the current behavior? (You can also link to an open issue here)
A short description of decorator method is missing.
What is the new behavior (if this is a feature change)?
A short description of decorator method added to the summary section.
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information:
Added short description for decorator method and link to it in the summary section.