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

Docs: Guide page for decorators #12163

Closed
Narretz opened this issue Jun 18, 2015 · 3 comments · Fixed by #14372
Closed

Docs: Guide page for decorators #12163

Narretz opened this issue Jun 18, 2015 · 3 comments · Fixed by #14372

Comments

@Narretz
Copy link
Contributor

Narretz commented Jun 18, 2015

decorators are a pretty nifty part of angular that is currently only documented as part of $provide. We should have a guide page that shows some common use cases: decorating a (core) service and decorating a directive. Probably also a good place to mention some limitations.

@Narretz Narretz added this to the 1.5.x - migration-facilitation milestone Jun 18, 2015
@sjbarker
Copy link
Contributor

@Narretz I was surprised there was no guide for decorators when I came across this. So, I am putting together a PR and I will have it opened soon, but I need to address backwards compatibility.

I see this is in the 1.5.x milestone but there aren't any branch labels. The document I created gives examples using a couple 1.5.x exclusive features and I then realized that it should probably be backwards compatible. The question is: how far back should this document support? If it is prior to v1.4.0-rc.0 then it looks like the initial version shouldn't include mentions of the decorator exposure through the module (e57138d) either. I can prepare a pre v1.4.0-rc.0 document and then a current document noting the module.decorator (a simple, but sometimes confusing aspect that I'd like to cover in the guide). Forgive me if I am making this more difficult than needs be, but I am not sure how the core team handles previous version support and patches.

Please get back to me when you can, and I will get a PR opened and ping you for a code review.

Thanks!

@awerlang
Copy link

awerlang commented Apr 1, 2016

@sjbarker The guides are versioned, e.g. https://code.angularjs.org/1.5.1/docs/guide. So BC is not an issue. To cover pre-v1.5, you'll need to backport.

@sjbarker
Copy link
Contributor

sjbarker commented Apr 1, 2016

@awerlang Fantastic thanks!

sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 5, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 5, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 5, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 5, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 6, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 21, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 26, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 26, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
sjbarker added a commit to sjbarker/angular.js that referenced this issue Apr 26, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

closes angular#12163
Narretz pushed a commit that referenced this issue May 6, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

Closes #12163
Closes #14372
Narretz pushed a commit that referenced this issue May 6, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

Closes #12163
Closes #14372
Narretz pushed a commit that referenced this issue May 6, 2016
+ explain decorators and how they are implemented in angular
+ explain how different types of services can be selected
+ explain `$delegate` objects and how they differ between services
+ warn of the risks/caveats of `$delegate` modification
+ note the exposure of `decorator` through the module api
+ show an example of decorating a core service
+ show an example of decorating a core directive
+ show an example of decorating a core filter

Closes #12163
Closes #14372
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants