Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add migration for self-closing tags #416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eneajaho
Copy link
Collaborator

@eneajaho eneajaho commented Jun 12, 2024

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 #395

@eneajaho eneajaho self-assigned this Jun 12, 2024
@eneajaho eneajaho requested a review from nartc June 12, 2024 11:54
docs: add docs for self-closing-tags migration
@eneajaho eneajaho force-pushed the feat/migrate-to-self-closing-tag branch from ab44a61 to 1eb9cbd Compare June 13, 2024 08:55
@tomer953
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: migrate components to self closing tags if there's no projected content
2 participants