Skip to content

Commit 5ab46f7

Browse files
committed
update readme
1 parent d4adb09 commit 5ab46f7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,48 @@ Highlighting the JS part as JS. So,
2727
- in `a && b` within an Angular expression, you should see `&&` correctly highlighted as the JS operator instead of an error you would see in normal HTML syntax.
2828
- in `{{1 + 2}}` interpolations, you should see JS syntax highlighting as well
2929

30+
## And...
31+
32+
Now it supports Angular control flow.
33+
34+
```
35+
@for (item of items) {
36+
<a [href]="item.link">{{item.title}}</a>
37+
} @empty {
38+
<p>No Items</p>
39+
}
40+
```
41+
42+
```
43+
@if (users$ | async; as users) {
44+
{{ users.length }}
45+
}
46+
```
47+
48+
```
49+
@if (a > b) {
50+
{{a}} is greater than {{b}}
51+
} @else if (b > a) {
52+
{{a}} is less than {{b}}
53+
} @else {
54+
{{a}} is equal to {{b}}
55+
}
56+
```
57+
58+
```
59+
@switch (condition) {
60+
@case (caseA) {
61+
Case A.
62+
}
63+
@case (caseB) {
64+
Case B.
65+
}
66+
@default {
67+
Default case.
68+
}
69+
}
70+
```
71+
3072
## How to use
3173

3274
The syntax is listed as `Ngx HTML` in Sublime syntax selection list.

0 commit comments

Comments
 (0)