angular-docs-cn/packages/compiler/test/expression_parser
Andrew Scott 6b4909c588 fix(compiler): Don't set expression text to synthetic `$implicit` when empty (#40583)
When parsing interpolations, if we encounter an empty interpolation
(`{{}}`), the current code uses a "pretend" value of `$implicit` for the
name as if the interplotion were really `{{$implicit}}`. This is
problematic because the spans are then incorrect downstream since they
are based off of the `$implicit` text.

This commit changes the interpretation of empty interpolations so that
the text is simply an empty string.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1077
Fixes https://github.com/angular/vscode-ng-language-service/issues/1078

PR Close #40583
2021-01-28 09:06:17 -08:00
..
utils fix(compiler): preserve this.$event and this.$any accesses in expressions (#39323) 2020-10-30 10:49:15 -07:00
BUILD.bazel build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
ast_spec.ts refactor(compiler): tidy up interpolation splitting (#39717) 2020-11-20 08:35:56 -08:00
lexer_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
parser_spec.ts fix(compiler): Don't set expression text to synthetic `$implicit` when empty (#40583) 2021-01-28 09:06:17 -08:00