Please sign in to comment.
fix(language-service): correctly parse expressions in an attribute (#…
…34517) Currently, the language service provides completions in a template node attribute by first checking if the attribute contains template bindings to provide completions for, and then providing completions for the expression in the attribute. In the latter case, the expression AST was being constructed "synthetically" inside the language service, in particular declaring the expression to be a `PropertyRead` with an implicit receiver. Unfortunately, this AST can be incorrect if the expression is actually a property read on a component property receiver (e.g. when reading `key` in the expression `obj.key`, `obj` is the receiver). The fix is pretty simple - rather than a synthetic construction of the AST, ask the expression parser to parse the expression in the attribute. Fixes angular/vscode-ng-language-service#523 PR Close #34517
- Loading branch information
Showing with 32 additions and 13 deletions.