Skip to content

fix(compiler): account for NgModule dependencies in JIT-compiled part…#69454

Open
JoostK wants to merge 1 commit into
angular:mainfrom
JoostK:compiler/ad-hoc-partial-decls-ngmodule-dep
Open

fix(compiler): account for NgModule dependencies in JIT-compiled part…#69454
JoostK wants to merge 1 commit into
angular:mainfrom
JoostK:compiler/ad-hoc-partial-decls-ngmodule-dep

Conversation

@JoostK

@JoostK JoostK commented Jun 20, 2026

Copy link
Copy Markdown
Member

…ial declarations

When partial declarations are not preprocessed to AOT by the linker, the ngDeclareComponent call causes them to be compiled ad-hoc. In this mode, NgModule imports in standalone components would be dropped, deviating from the linker. This commit changes the ad-hoc compilation of component declarations to pass the NgModule imports along just like the linker does.

Fixes #69451

…ial declarations

When partial declarations are not preprocessed to AOT by the linker, the `ngDeclareComponent`
call causes them to be compiled ad-hoc. In this mode, NgModule imports in standalone components
would be dropped, deviating from the linker. This commit changes the ad-hoc compilation of
component declarations to pass the NgModule imports along just like the linker does.

Fixes angular#69451
@pullapprove pullapprove Bot requested a review from JeanMeche June 20, 2026 12:22
@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jun 20, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 20, 2026
@JoostK JoostK added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT application ignores NgModule providers from AOT-compiled library imported through a standalone component

1 participant