Self-closing tags are supported in Angular templates since v16. .
This schematic migrates the templates in your application to use self-closing tags.
Run the schematic using the following command:
ng generate @angular/core:self-closing-tag
Before
<!-- Before --><hello-world></hello-world><!-- After --><hello-world />