Skip to content

fix(core): support nested arrays of providers in EnvironmentInjector#45789

Closed
AndrewKushnir wants to merge 1 commit intoangular:masterfrom
AndrewKushnir:nested_arrays_in_env_inj
Closed

fix(core): support nested arrays of providers in EnvironmentInjector#45789
AndrewKushnir wants to merge 1 commit intoangular:masterfrom
AndrewKushnir:nested_arrays_in_env_inj

Conversation

@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Apr 28, 2022

This commit updates the EnvironmentInjector logic to support arrays of providers as an argument (for example, when an injector is created via createEnvironmentInjector function).

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

This commit updates the `EnvironmentInjector` logic to support arrays of providers as an argument(for example, when an injector is created via `createEnvironmentInjector` function).
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: major This PR is targeted for the next major release labels Apr 28, 2022
@ngbot ngbot bot added this to the Backlog milestone Apr 28, 2022
const A = new InjectionToken('A');
const B = new InjectionToken('B');
const C = new InjectionToken('C');
const MULTI = new InjectionToken('D');

Choose a reason for hiding this comment

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

super nit: name it 'MULTI' as well? I was a bit confused seeing 'D' here. Feel free to ignore.

Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM generally speaking. Still, I wonder if we shouldn't add more tests to the actual public APIs where an env injector is created (ex. bootstrapApplication). WDYT?

@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 28, 2022
@dylhunn
Copy link
Contributor

dylhunn commented Apr 28, 2022

This PR was merged into the repository by commit 4e413d9.

@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 May 29, 2022
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 area: core Issues related to the framework runtime target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants