I would use this syntax to set the index value into an attribute of the HTML element:
Angular >= 2
You have to use let to declare the value rather than #.
- {{item}}
Angular = 1
- {{item}}
Here is the updated plunkr: http://plnkr.co/edit/LiCeyKGUapS5JKkRWnUJ?p=preview.
In Angular 5/6/7/8:
- {{i+1}} {{item}}
In older versions
- {{i+1}} {{item}}
Angular.io ▸ API ▸ NgForOf
Description
Local variables
Unit test examples
ng_for_spec.ts
Another interesting example
Grouping