This is my demo code where i explain my goal in comments:
product.component.html
<div *ngFor="let item of items1">
<div *ngFor="let item of items2">
<input type="text" value="{{data[getNumber()]}}"> //I want to get data[0] till data[6]
</div>
</div>
product.component.ts
export class ProductComponent{
itens1=["A","B","C","D"];
itens2=["X","Y","Z"];
data=[1,2,3,4,5,6,7];
number=0;
getNumber(){
return this.number++;
}
}
These are the errors i get:
I hope to have explained my problem well.