angular/packages/compiler/test
Andrew Scott 1bce51c0ed fix(compiler-cli): Handle ng-template with structural directive in indexer (#44788)
An `ng-template` with an inline template (i.e. has a structural
directive) would previously not get an `undefined` `tagName` because the
logic assumed the element would be `t.Element` or `t.Content` and read
the tag name from the `name` property. For a `t.Template`, this exists
instead on the `t.tagName`. The final result would be an `tagName` of `undefined`
for the parent `t.Template`, causing failures in the indexer downstream.

This `undefined` value is actually expected in the renderer code, even
though the type does not specify this possibility. This change updates
the type of `tagName` to be `string|null` and explicitly handles the
case where there is a structural directive on an `ng-template`. You can
see how the two are differentiated in the compliance code that was
modified in this commit.

PR Close #44788
2022-01-25 14:15:44 -08:00
..
expression_parser feat(compiler): add support for safe calls in templates (#44580) 2022-01-11 17:32:47 +00:00
i18n test: remove view-engine-only tests (#43884) 2021-11-23 21:10:06 +00:00
ml_parser build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
output refactor(compiler): remove output AST functions (#44411) 2022-01-04 15:54:10 -08:00
render3 fix(compiler-cli): Handle ng-template with structural directive in indexer (#44788) 2022-01-25 14:15:44 -08:00
schema test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
selector build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
compiler_facade_interface_spec.ts refactor(compiler): implement ngDeclareInjectable() (#41316) 2021-04-07 13:57:13 -07:00
integration_spec.ts feat(core): update reference and doc to change async to waitAsync. (#37583) 2020-08-03 12:54:13 -07:00
shadow_css_spec.ts fix(compiler): preserve @page rules in encapsulated styles (#41915) 2021-05-06 09:33:56 -04:00
style_url_resolver_spec.ts refactor(compiler): make template preparser null-safe (#44411) 2022-01-04 15:54:10 -08:00
util_spec.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00