angular-docs-cn/packages/compiler/src
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
..
aot fix(compiler): Metadata should not include methods on Object.prototype (#38292) 2020-07-30 15:18:28 -07:00
compiler_util refactor(compiler): store the `fullStart` location on `ParseSourceSpan`s (#39486) 2020-11-06 09:01:37 -08:00
expression_parser fix(compiler): Don't set expression text to synthetic `$implicit` when empty (#40583) 2021-01-28 09:06:17 -08:00
i18n docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
jit docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
ml_parser fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
output feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
render3 refactor(core): Remove the need for explicit static query instruction (#40091) 2021-01-14 13:55:02 -08:00
schema refactor(compiler-cli): introduce APIs to support directive autocompletion (#40032) 2020-12-14 12:08:41 -08:00
template_parser fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
view_compiler fix(core): `QueryList` should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
assertions.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ast_path.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
chars.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compile_metadata.ts fix(core): `QueryList` should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
compile_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compiler.ts fix(compiler): incorrectly interpreting some HostBinding names (#40233) 2021-01-07 13:15:46 -08:00
compiler_facade_interface.ts fix(core): `QueryList` should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
config.ts refactor(compiler): remove extra imports (#37246) 2020-06-11 19:00:33 -07:00
constant_pool.ts feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
core.ts refactor(core): Remove the need for explicit static query instruction (#40091) 2021-01-14 13:55:02 -08:00
directive_normalizer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directive_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
identifiers.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
injectable_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
injectable_compiler_2.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
jit_compiler_facade.ts fix(core): `QueryList` should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
lifecycle_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_resolver.ts fix(core): `QueryList` should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
ng_module_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_module_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
parse_util.ts refactor(compiler): store the `fullStart` location on `ParseSourceSpan`s (#39486) 2020-11-06 09:01:37 -08:00
pipe_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
provider_analyzer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
resource_loader.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
selector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadow_css.ts Revert "fix(compiler): support multiple `:host-context()` selectors (#40494)" (#40531) 2021-01-22 16:45:39 -08:00
style_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
style_url_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
summary_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_resolver.ts docs: remove unused "docregions" (#40479) 2021-01-20 16:12:15 -08:00
util.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00