angular/packages/compiler/test/render3
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
..
util feat(compiler): add support for safe calls in templates (#44580) 2022-01-11 17:32:47 +00:00
view feat(compiler-cli): provide the animations for DirectiveMeta (#44630) 2022-01-10 21:22:44 +00:00
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
r3_ast_absolute_span_spec.ts fix(compiler): correct spans when parsing bindings with comments (#44785) 2022-01-24 10:41:53 -08:00
r3_ast_spans_spec.ts fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
r3_template_transform_spec.ts fix(compiler-cli): Handle ng-template with structural directive in indexer (#44788) 2022-01-25 14:15:44 -08:00
README.md feat(compiler): implement "enableIvy" compiler option (#21427) 2018-01-18 18:22:44 -06:00
style_parser_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00

Tests in this directory are excluded from running in the browser and only run in node.