fix(ivy): record correct absolute source span for ngForOf expressions (#31813)
Expressions in an inline template binding are improperly recorded as spaning an offset calculated from the start of the template binding attribute key, whereas they should be calculated from the start of the attribute value, which contains the actual binding AST. PR Close #31813
This commit is contained in:

committed by
Kara Erickson

parent
12444a8afc
commit
ddc229b69b
@ -764,7 +764,7 @@ export class _ParseAST {
|
||||
const ast = this.parsePipe();
|
||||
const source = this.input.substring(start - this.offset, this.inputIndex - this.offset);
|
||||
expression =
|
||||
new ASTWithSource(ast, source, this.location, this.absoluteOffset, this.errors);
|
||||
new ASTWithSource(ast, source, this.location, this.absoluteOffset + start, this.errors);
|
||||
}
|
||||
|
||||
bindings.push(new TemplateBinding(
|
||||
|
Reference in New Issue
Block a user