Skip to content

Conversation

@Ionaru
Copy link
Contributor

@Ionaru Ionaru commented Aug 3, 2025

Self-closing tags have been supported since Angular 16 and improve readability when Angular components without content are used inside a template.

Since most FontAwesome components do not support content projection, there's no use for the space between the opening and closing tags of the elements.

<fa-icon [icon]="faCoffee"></fa-icon> -> <fa-icon [icon]="faCoffee" />

Using the self-closing tag on <fa-icon /> clearly communicates that the element doesn't expect any content between the opening and closing tags.


This PR changes most the documentation and examples to use the self-closing tags.

The only files I left as-is are all but the latest file in the upgrading/ folder, since those can be referenced with Angular versions below 16.

@devoto13 devoto13 force-pushed the self-closing-tags branch from c22857e to 26a27a0 Compare August 3, 2025 20:21
Copy link
Collaborator

@devoto13 devoto13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks neat!
Thank you for the contribution :)

@devoto13 devoto13 merged commit 21513a9 into FortAwesome:main Aug 3, 2025
4 checks passed
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.

2 participants