Angular, Angular 17, Control Flow, Template Syntax, Ngif Else.
can use an object’s property instead. Of course, the contextual variables we had with ngFor are still available to get the index of an element or more row information: @for (item of items; track item.id; let idx = $index, e = $even) { Item #{{ idx }}: {{ item.name }} } Different local variables