I have a simple loop like this:
<div *ngFor="let treatment of data.treatments; let order = index">
{{treatment.order}}
<input type="text" [(ngModel)]="treatment.name.dutch" >
</div>
Now I would like to set treatment.order = order
in my template code. So that the list would always be
1...
2...
3...
But also that the variable treatment.order would then have the corresponding order in the list. I can't seem to find a way to do this