Skip to content

refactor(compiler): add support for importing foreign components#68643

Draft
leonsenft wants to merge 4 commits into
angular:mainfrom
leonsenft:foreign-imports
Draft

refactor(compiler): add support for importing foreign components#68643
leonsenft wants to merge 4 commits into
angular:mainfrom
leonsenft:foreign-imports

Conversation

@leonsenft
Copy link
Copy Markdown
Contributor

This is currently based on #68336

  • Added the ForeignComponent type in @angular/core.
  • Updated Component.imports signature to accept ForeignComponent.
  • Updated the compiler to handle ForeignComponent in template dependencies.
  • Updated ngtsc to extract foreignImports from standalone components.

Note the compiler doesn't do anything yet with these imports.

alxhub and others added 3 commits April 22, 2026 11:47
Creates the foreign view mechanism to support standard ViewContainerRef
using a dedicated ɵForeignViewRef implementation. Updates tests to use
public APIs (vcr.detach and vcr.insert), asserts on total innerHTML, and
exports ɵForeignViewRef privately from core.
This adds the new (internal) `applyForeignNodes()` function to the
bundle goldens.
@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime labels May 8, 2026
@ngbot ngbot Bot added this to the Backlog milestone May 8, 2026
@leonsenft leonsenft force-pushed the foreign-imports branch 5 times, most recently from ac0c02f to 90da7b8 Compare May 11, 2026 18:16
- Added the ForeignComponent type in @angular/core.
- Added Component.foreignImports for importing ForeignComponents.
- Updated the compiler to handle ForeignComponent in template dependencies.
- Updated ngtsc to extract foreignImports from standalone components.

Note the compiler doesn't do anything yet with these imports.
@leonsenft leonsenft added the target: patch This PR is targeted for the next patch release label May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime detected: feature PR contains a feature commit target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants