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: add information on when not to use tree-shakable providers #23634
Conversation
You can preview cc522eb at https://pr23634-cc522eb.ngbuilds.io/. |
Looks okay to me. @StephenFluin Please review. If okay, approve and mark for merge. Thanks! |
@chembu This text is not correct. Any provider can be overridden, but they must be overriden using the traditional providers array syntax. |
You can preview 33a00e2 at https://pr23634-33a00e2.ngbuilds.io/. |
You can preview e8b828d at https://pr23634-e8b828d.ngbuilds.io/. |
@@ -440,6 +440,12 @@ The service can be instantiated by configuring a factory function as shown below | |||
|
|||
<code-example path="dependency-injection/src/app/tree-shaking/service.0.ts" title="src/app/tree-shaking/service.0.ts" linenums="false"> </code-example> | |||
|
|||
<div class="l-sub-section"> | |||
|
|||
To override tree-shakable providers, register the provider in the `providers[]` array of any Angular decorator that supports it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's providers[]
array? Should be providers
array for property name or providers: []
array for usage or Provider[]
for type annotation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Providers: [] array syntax. Updated note to clarify it.
e8b828d
to
ff07227
Compare
You can preview ff07227 at https://pr23634-ff07227.ngbuilds.io/. |
ff07227
to
a04b509
Compare
You can preview a04b509 at https://pr23634-a04b509.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Does not have documentation for when not to use tree-shakable injector format.
Issue Number: 23621
What is the new behavior?
Added a note explaining when not to use tree-shakable provider format.
Does this PR introduce a breaking change?
Other information