fix(ivy): handle pipes in i18n attributes properly (#30573)
Prior to this change we processed binding expression (including bindings with pipes) in i18n attributes before we generate update instruction. As a result, slot offsets for pipeBind instructions were calculated incorrectly. Now we perform binding expression processing when we generate "update block" instructions, so offsets are calculated correctly. PR Close #30573
This commit is contained in:

committed by
Jason Aden

parent
70fd4300f4
commit
02523debe5
@ -643,8 +643,9 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
|
||||
i18nAttrArgs.push(o.literal(attr.name), this.i18nTranslate(message, params));
|
||||
converted.expressions.forEach(expression => {
|
||||
hasBindings = true;
|
||||
const binding = this.convertExpressionBinding(implicit, expression);
|
||||
this.updateInstruction(elementIndex, element.sourceSpan, R3.i18nExp, [binding]);
|
||||
this.updateInstruction(
|
||||
elementIndex, element.sourceSpan, R3.i18nExp,
|
||||
() => [this.convertExpressionBinding(implicit, expression)]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user