Preserve Angular control flow syntax in ngNonBindable directive (#20066)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Максим Ивановandfisker authored and GitHub committed 2026-09-20 08:43:36 +08:00
1 parent 1a15312010
commit 0292df6bf3
6 files changed
+240 -2

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#### Preserve Angular syntax inside elements with `ngNonBindable` directive (#20066 by @splincode)
<!-- prettier-ignore -->
```html
<!-- Input -->
<span ngNonBindable>@if(foo){bar}</span>
<span ngNonBindable>@let foo=bar+baz;</span>
<!-- Prettier stable -->
<span ngNonBindable>
@if (foo) {
bar
}
</span>
<span ngNonBindable>@let foo = bar + baz;</span>
<!-- Prettier main -->
<span ngNonBindable>@if(foo){bar}</span>
<span ngNonBindable>@let foo=bar+baz;</span>
```