Below is a demo code where I am explaining my goal through comments:
product.component.html
<div *ngFor="let item of items1">
<div *ngFor="let item of items2">
<input type="text" value="{{data[getNumber()]}}"> //I aim to fetch values from data[0] to 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++;
}
}
Here are the errors I am encountering:
https://i.sstatic.net/SullB.png
I trust that my issue has been elucidated clearly.