Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs($provide): Decorator method in summary #14562

Closed
wants to merge 3 commits into from

Conversation

ajaygm
Copy link
Contributor

@ajaygm ajaygm commented May 5, 2016

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.

Added short description for decorator method and link to it in the summary section.
@googlebot
Copy link

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. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

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. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels May 5, 2016
@@ -359,6 +359,8 @@ function annotate(fn, strictDi, name) {
* * {@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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@Narretz Narretz added this to the Backlog milestone May 6, 2016
Decorator function can decorate any type of provider not just services.
@ajaygm
Copy link
Contributor Author

ajaygm commented May 15, 2016

Hi @Narretz
Thanks for your review. I had picked the summary from the detailed description at the bottom of the code. Based on your comment, have tried to update the detailed description section as well. Please let me know if it looks ok now.
Thanks!

@@ -359,6 +359,8 @@ function annotate(fn, strictDi, name) {
* * {@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, decorFn)} - registers a **decorator function**,
* `decorFn`, with the {@link auto.$injector $injector}, `name` the name of the provider to decorate.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, name the name of the provider to decorate. -> ; name is the name of the provider to decorate.

@Narretz
Copy link
Contributor

Narretz commented May 17, 2016

@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?

@Narretz Narretz self-assigned this May 17, 2016
petebacondarwin pushed a commit that referenced this pull request May 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants