You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,48 @@ Highlighting the JS part as JS. So,
27
27
- 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.
28
28
- in `{{1 + 2}}` interpolations, you should see JS syntax highlighting as well
29
29
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
+
30
72
## How to use
31
73
32
74
The syntax is listed as `Ngx HTML` in Sublime syntax selection list.
0 commit comments