Skip to content

refactor(core): rename primitives/di inject to injectFromCurrentInjector#67098

Closed
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:refactor/rename-inject
Closed

refactor(core): rename primitives/di inject to injectFromCurrentInjector#67098
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:refactor/rename-inject

Conversation

@arturovt
Copy link
Contributor

Both @angular/core and @angular/core/primitives/di export a function named inject, causing a named export conflict when merging into a single SystemJS bundle. Rename the primitives/di version to injectFromCurrentInjector to reflect its actual behavior and align with the existing getCurrentInjector and setCurrentInjector naming convention in that module.

Both @angular/core and @angular/core/primitives/di export a function named
inject, causing a named export conflict when merging into a single SystemJS
bundle. Rename the primitives/di version to injectFromCurrentInjector to
reflect its actual behavior and align with the existing getCurrentInjector
and setCurrentInjector naming convention in that module.
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Feb 17, 2026
@ngbot ngbot bot added this to the Backlog milestone Feb 17, 2026
@thePunderWoman
Copy link
Contributor

I don't think this is something we would change as it has internal implications. Thank you though!

@arturovt
Copy link
Contributor Author

@thePunderWoman I understand this is internal, but the fact that it's internal doesn't mean it can't impact developers. When bundling Angular packages for SystemJS (which is required for single-spa microfrontends), these primitives are pulled in transitively and the naming conflict causes real runtime issues. The internal/public distinction breaks down at the bundling layer. Would love to hear if there's a recommended approach for this use case.

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

Labels

area: core Issues related to the framework runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants