Co-authored-by: dweizhe <d.weizhe@anyong.com.tw> Co-authored-by: fisker <lionkay@gmail.com>
48 lines
812 B
HTML
48 lines
812 B
HTML
<ul>
|
|
@for (
|
|
let
|
|
|
|
item of items;index as
|
|
i;
|
|
trackBy: trackByFn
|
|
) {
|
|
<li><strong>{{item.name}}</strong></li>
|
|
}
|
|
@empty {
|
|
<span>The collection is empty</span>
|
|
}
|
|
</ul>
|
|
|
|
|
|
<li *ngFor="
|
|
let
|
|
|
|
item of items;index as
|
|
i;
|
|
trackBy: trackByFn
|
|
"></li>
|
|
|
|
|
|
|
|
<ul>
|
|
@for (item of collection; track item.id; let index = $index, first = $first; let last = $last, even = $even, odd = $odd; let count = $count) {
|
|
|
|
<li><strong>{{item.name}}</strong> index={{index}} first={{first}} last={{last}} even={{even}} odd={{odd}} count={{count}}</li>
|
|
|
|
}
|
|
</ul>
|
|
|
|
<ul>
|
|
@for (item of
|
|
emptyCollection; track item.id;) {
|
|
<li><strong>{{item.name}}</strong></li>
|
|
}
|
|
@empty {
|
|
<span>The collection is empty</span>
|
|
}
|
|
</ul>
|
|
<li *ngFor="
|
|
item of
|
|
emptyCollection; track item.id;
|
|
"></li>
|