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

Angular: allow self-closing tags on custom elements #14170

merged 6 commits into from Jan 14, 2023


Copy link

@fisker fisker commented Jan 13, 2023


Fixes #14168


  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/ file following changelog_unreleased/
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker changed the title Allow self closing tag in anuglar template Allow self-closing tags on angular component Jan 13, 2023
@fisker fisker marked this pull request as ready for review January 13, 2023 02:07
@fisker fisker changed the title Allow self-closing tags on angular component Angular: allow self-closing tags on custom elements Jan 14, 2023
@fisker fisker merged commit 4ad9160 into prettier:main Jan 14, 2023
28 checks passed
@fisker fisker deleted the 14168 branch January 14, 2023 02:57
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Jan 14, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
| [prettier]( ([source]( | devDependencies | patch | [`2.8.2` -> `2.8.3`]( |


### Release Notes


### [`v2.8.3`](;283)

[Compare Source](prettier/prettier@2.8.2...2.8.3)


##### Allow self-closing tags on custom elements ([#&#8203;14170](prettier/prettier#14170) by [@&#8203;fisker](

See [Angular v15.1.0 release note]( for details.

<!-- prettier-ignore -->

// Input

// Prettier 2.8.2
SyntaxError: Only void and foreign elements can be self closed "app-test" (1:1)
> 1 | <app-test/>
    | ^^^^^^^^^
  2 |

// Prettier 2.8.3
<app-test />



### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

 **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.


 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box


This PR has been generated by [Renovate Bot](

Co-authored-by: cabr2-bot <>
Reviewed-by: crapStone <>
Co-authored-by: Calciumdibromid Bot <>
Co-committed-by: Calciumdibromid Bot <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Angular templates self closing tags
1 participant