angular/packages/compiler-cli/src
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
..
bin test: update dynamic-compiler test to be compatible with APF v13 (#43431) 2021-10-01 18:28:46 +00:00
ngtsc fix(compiler-cli): Handle ng-template with structural directive in indexer (#44788) 2022-01-25 14:15:44 -08:00
transformers refactor(compiler): delete View Engine components of @angular/compiler (#44368) 2021-12-06 13:12:36 -05:00
extract_i18n.ts refactor(compiler-cli): remove dependency on minimist (#43644) 2021-10-04 17:31:03 -07:00
main.ts refactor(compiler): delete View Engine components of @angular/compiler (#44368) 2021-12-06 13:12:36 -05:00
perform_compile.ts refactor(compiler): remove syntax error logic (#44411) 2022-01-04 15:54:09 -08:00
perform_watch.ts refactor(compiler): delete View Engine components of @angular/compiler (#44368) 2021-12-06 13:12:36 -05:00
typescript_support.ts refactor(compiler-cli): move version number helpers out of diagnostics subfolder (#44269) 2021-12-01 10:36:30 -08:00
version.ts docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
version_helpers.ts refactor(compiler-cli): move version number helpers out of diagnostics subfolder (#44269) 2021-12-01 10:36:30 -08:00