New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(fix): wrong explanation of @Injectable decorator #27480

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@stevermeister
Contributor

stevermeister commented Dec 5, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

Other information

it was wrong explanation of @Injectable decorator

@googlebot googlebot added the cla: yes label Dec 5, 2018

@stevermeister

This comment has been minimized.

Contributor

stevermeister commented Dec 5, 2018

hm, it says problem with commit message, what's wrong with it?
https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit

@alfaproject

This comment has been minimized.

Contributor

alfaproject commented Dec 5, 2018

fix is not a valid scope. That's a commit type, but in here the type is docs.

This is what you probably want: docs: fix wrong explanation of @Injectable decorator

@@ -73,7 +73,7 @@ Angular provides predefined pipes for common transformations, and you can also d
## Services and dependency injection
For data or logic that isn't associated with a specific view, and that you want to share across components, you create a *service* class. A service class definition is immediately preceded by the `@Injectable()` decorator. The decorator provides the metadata that allows your service to be *injected* into client components as a dependency.
For data or logic that isn't associated with a specific view, and that you want to share across components, you create a *service* class. A service class definition is immediately preceded by the `@Injectable()` decorator. The decorator provides the metadata that allows to *inject* another services into your service as a dependency.

This comment has been minimized.

@trotyl

trotyl Dec 6, 2018

Contributor

The requirement only applies to ClassProvider. For example, Router is a well-known service that has many dependencies, but not having Injectable() due to it's created by FactoryProvider:

* @publicApi
*/
export class Router {

This comment has been minimized.

@stevermeister

stevermeister Dec 6, 2018

Contributor

you are right, but current version is completely wrong

@stevermeister stevermeister force-pushed the stevermeister:doc-fix branch from 3e79160 to 9c7b96e Dec 6, 2018

@stevermeister

This comment has been minimized.

Contributor

stevermeister commented Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment