angular/packages/compiler
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
..
design refactor: fix various typos across different packages (#44523) 2022-01-07 18:11:10 +00:00
src fix(compiler-cli): Handle ng-template with structural directive in indexer (#44788) 2022-01-25 14:15:44 -08:00
test fix(compiler-cli): Handle ng-template with structural directive in indexer (#44788) 2022-01-25 14:15:44 -08:00
testing test: remove view-engine-only tests (#43884) 2021-11-23 21:10:06 +00:00
BUILD.bazel build: update visibility for npm package targets to work with new integration test structure (#44238) 2021-12-08 13:42:41 -05:00
compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(core): update node version support range to support v16 (#43740) 2021-10-06 10:55:44 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00