Repository navigation
fix(angular): resolve universal element injectors per renderer - #4129
Merged
josemontespg merged 2 commits intoNov 13, 2026
Merged
josemontespg merged 2 commits into
josemontespg merged 2 commits into
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
josemontespg
added a commit
to josemontespg/A2UI-fork
that referenced
this pull request
Nov 10, 2026
josemontespg
force-pushed
the
angular-universal-google3-readiness
branch
from
November 10, 2026 21:34
8adbb7e to
daef762
Compare
8 tasks
josemontespg
commented
Nov 11, 2026
josemontespg
force-pushed
the
angular-universal-google3-readiness
branch
from
November 11, 2026 22:02
d71fe00 to
abba9ea
Compare
josemontespg
marked this pull request as ready for review
November 11, 2026 22:13
ditman
approved these changes
Nov 12, 2026
ditman
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! Thanks for marking the <a2ui-ng-<name>> wrapper change as a **BREAKING CHANGE**, that was my only comment!
josemontespg
force-pushed
the
angular-universal-google3-readiness
branch
from
November 13, 2026 18:31
abba9ea to
dc6790f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With
useUniversalComponents, every catalog entry renders as a custom element that looks up the AngularInjectorit needs when it connects. This PR fixes that lookup for pages with more than one renderer, and lets plain{...api, component}entries render inside universal containers.An
AngularWcHostnow takes its owninjectorfirst. Then it tries the nearestComponentHostComponentabove it in the DOM, then theA2uiRendererServicethat owns its surface, and finally a stack of fallback injectors. Destroying one renderer no longer clears the fallback of another.Breaking: with
useUniversalComponents: true, plain{...api, component}entries now mount inside an<a2ui-ng-<name>>host element.Changes
AngularCatalogaddstagNameandelementto plain{...api, component}entries, so universal containers can render them. Extensible entries are updated in place to keep their identity.AngularWcHostresolves its injector from the DOM host, then the surface group, then the fallback stack.ComponentHostComponentandA2uiRendererServiceregister their injectors for this lookup.A2uiLitElement.adoptLightDomStylescaches scoped styles per element class instead of in inherited static fields, so a subclass registered under another tag gets its own sheet.Verification
yarn --cwd typescript/core/web_core testand the Angular karma suite (ng test lib), with the new specs confirmed in the karma output.yarn lintin both packages, the web_core and Angular builds, and./scripts/fix_format.sh --check.Part of #4148.