Skip to content

Commit 6e8f29c

Browse files
authored
docs(cdk): update rxIfList documentation by then and else templates
1 parent 7883d0c commit 6e8f29c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

libs/cdk/template/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ The term list does include: arrays and interables.
1414
<ul>
1515
<li *rxIfList="[1,2,3]">List is not empty</li>
1616
</ul>
17-
```
1817

18+
```
19+
Similar to `ngIf` `rxIfList` supports templates for `then` and `else`:
20+
```html
21+
<ul>
22+
<li *rxIfList="[1,2,3]; then thenTpl else emptyListTpl"></li>
23+
</ul>
24+
<ng-template #thenTpl>List is not empty</ng-template>
25+
<ng-template #emptyListTpl>List is empty.</ng-template>
26+
```
1927
#### `RunFnPipe`
2028
This pipe will run any function of your component and
2129
make use of Angular's memoization to prevent unnecessary

0 commit comments

Comments
 (0)