-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compiler): capture data bindings for content projection purposes in blocks #54876
Conversation
…in blocks Fixes a regression in the template pipeline where data bindings weren't being captured for content projection purposes. Fixes angular#54872.
@@ -359,7 +359,7 @@ function ingestIfBlock(unit: ViewCompilationUnit, ifBlock: t.IfBlock): void { | |||
cView.contextVariables.set(ifCase.expressionAlias.name, ir.CTX_REF); | |||
} | |||
|
|||
let ifCaseI18nMeta = undefined; | |||
let ifCaseI18nMeta: i18n.BlockPlaceholder|undefined = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change, I just saw that vscode was flagging this as an error.
for (const attr of root.attributes) { | ||
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true); | ||
unit.update.push(ir.createBindingOp( | ||
xref, ir.BindingKind.Attribute, attr.name, o.literal(attr.value), null, securityContext, | ||
true, false, null, asMessage(attr.i18n), attr.sourceSpan)); | ||
} | ||
|
||
// Also collect the inputs since they participate in content projection as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: fw-core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: fw-compiler
(thanks for fixing this issue @crisbeto!) |
This PR was merged into the repository by commit 879bd80. |
…in blocks (angular#54876) Fixes a regression in the template pipeline where data bindings weren't being captured for content projection purposes. Fixes angular#54872. PR Close angular#54876
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes a regression in the template pipeline where data bindings weren't being captured for content projection purposes.
Fixes #54872.