ngxtension / ngxtension-platform

Utilities for Angular
https://ngxtension.netlify.app/
MIT License
591 stars 87 forks source link

feat: add migration for self-closing tags #416

Closed eneajaho closed 2 months ago

eneajaho commented 3 months ago

Angular supports self-closing tags. This means that you can write tags like <app-component /> instead of <app-component></app-component>. This is a feature that was introduced in Angular 16.

To run the migration you can run:

ng g ngxtension:convert-to-self-closing-tag

Closes https://github.com/ngxtension/ngxtension-platform/issues/395

tomer953 commented 3 months ago

FYI, angular-eslint has implemented this as eslint rule with auto fix. I would consider adding a reference or "tip" in the util docs, if someone wants to add this rule to avoid closing-tags after the migration.