angular-cn/packages/compiler-cli/src
JoostK 3e3a1ef30d fix(ivy): support dynamic query tokens in AOT mode (#35307)
For view and content queries, the Ivy compiler attempts to statically
evaluate the predicate token so that string predicates containing
comma-separated reference names can be split into an array of strings
during compilation. When the predicate is a dynamic value that cannot be
statically interpreted at compile time, the compiler would previously
produce an error. This behavior breaks a use-case where an `InjectionToken`
is being used as query predicate, as the usage of the `new` keyword
prevents such predicates from being statically evaluated.

This commit changes the behavior to no longer produce an error for
dynamic values. Instead, the expression is emitted as is into the
generated code, postponing the evaluation to happen at runtime.

Fixes #34267
Resolves FW-1828

PR Close #35307
2020-02-27 16:05:21 -08:00
..
diagnostics refactor(compiler-cli): Move diagnostics files to language service (#33809) 2019-11-14 09:29:07 -08:00
metadata fix(compiler-cli): allow declaration-only template type check members (#34296) 2019-12-10 16:31:23 -08:00
ngtsc fix(ivy): support dynamic query tokens in AOT mode (#35307) 2020-02-27 16:05:21 -08:00
transformers fix(compiler-cli): add `sass` as a valid css preprocessor extension (#35052) 2020-01-31 13:28:39 -08:00
extract_i18n.ts refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
language_services.ts refactor(compiler-cli): Move diagnostics files to language service (#33809) 2019-11-14 09:29:07 -08:00
main.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
perform_compile.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
perform_watch.ts fix(ivy): recompile on template change in ngc watch mode on Windows (#34015) 2020-02-04 10:40:22 -08:00
tooling.ts fix(ivy): retain JIT metadata unless JIT mode is explicitly disabled (#33671) 2019-11-20 12:55:43 -08:00
typescript_support.ts build: typescript 3.7 support (#33717) 2020-01-14 16:42:21 -08:00
version.ts style: remove empty comments (#23404) 2018-05-10 15:48:13 -07:00