跟蹤當前互動示例

<div *ngFor="let item of items; let i = index">
  <p>Item number: {{i}}</p>    
</div>

在這種情況下,我將獲取 index 的值,這是當前迴圈迭代。