Angular: Support @content block (#19431)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-06-23 20:01:45 +08:00
1 parent aadd3ee2b8
commit e736c0e858
5 files changed
+77 -3

No files matched your search

@@ -75,6 +75,35 @@ parsers: ["angular"]
================================================================================
`;
exports[`content.html format 1`] = `
====================================options=====================================
parsers: ["angular"]
printWidth: 80 (default) |
=====================================input======================================
<FancyButton [label]="title">
@content(icon) {
<span>Icon!</span>
}
@content(description) {
<span>Description text</span>
}
<span>Other children</span>
</FancyButton>
=====================================output=====================================
<FancyButton [label]="title">
@content(icon) {
<span>Icon!</span>
}
@content(description) {
<span>Description text</span>
}
<span>Other children</span>
</FancyButton>
================================================================================
`;
exports[`default-never.html format 1`] = `
====================================options=====================================
parsers: ["angular"]
@@ -0,0 +1,9 @@
<FancyButton [label]="title">
@content(icon) {
<span>Icon!</span>
}
@content(description) {
<span>Description text</span>
}
<span>Other children</span>
</FancyButton>