Skip to content
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

Closed

Conversation

sreevani-ship-it
Copy link
Contributor

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
[x] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

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?

[ ] Yes
[x] No

Other information

@mary-poppins
Copy link

You can preview cc522eb at https://pr23634-cc522eb.ngbuilds.io/.

@jenniferfell jenniferfell added comp: docs target: major This PR is targeted for the next major release labels May 1, 2018
@jenniferfell
Copy link
Contributor

Looks okay to me.

@StephenFluin Please review. If okay, approve and mark for merge. Thanks!

@jenniferfell jenniferfell added this to the v6-candidates milestone May 1, 2018
@StephenFluin
Copy link
Contributor

@chembu This text is not correct. Any provider can be overridden, but they must be overriden using the traditional providers array syntax.

@mary-poppins
Copy link

You can preview 33a00e2 at https://pr23634-33a00e2.ngbuilds.io/.

@mary-poppins
Copy link

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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@mary-poppins
Copy link

You can preview ff07227 at https://pr23634-ff07227.ngbuilds.io/.

@mary-poppins
Copy link

You can preview a04b509 at https://pr23634-a04b509.ngbuilds.io/.

@jenniferfell jenniferfell added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label May 2, 2018
@IgorMinar IgorMinar added the action: merge The PR is ready for merge by the caretaker label May 2, 2018
@ngbot
Copy link

ngbot bot commented May 2, 2018

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci/circleci: test" is failing
    failure status "ci/circleci: integration_test" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
No open projects
docs
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

7 participants