Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
princemaple committed Jan 16, 2024
1 parent d4adb09 commit 5ab46f7
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,48 @@ Highlighting the JS part as JS. So,
- 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.
- in `{{1 + 2}}` interpolations, you should see JS syntax highlighting as well

## And...

Now it supports Angular control flow.

```
@for (item of items) {
<a [href]="item.link">{{item.title}}</a>
} @empty {
<p>No Items</p>
}
```

```
@if (users$ | async; as users) {
{{ users.length }}
}
```

```
@if (a > b) {
{{a}} is greater than {{b}}
} @else if (b > a) {
{{a}} is less than {{b}}
} @else {
{{a}} is equal to {{b}}
}
```

```
@switch (condition) {
@case (caseA) {
Case A.
}
@case (caseB) {
Case B.
}
@default {
Default case.
}
}
```

## How to use

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

0 comments on commit 5ab46f7

Please sign in to comment.