I have two arrays files and currentlyRunning.
Suppose the file is in index 0 and its progress is inside currentlyRunning[1].progress
which is index 1
I am running the ngFor
to show all files. Would this ngIf
in the td work to fetch the correct progress because the index could be different but the file id is unique.
<tr *ngFor="let files of File; let index=i;">
<td>
{{file.name}}
</td>
<td>
{{file.id}}
</td>
<td *ngIf="file.id === currentlyRunning[i].id">
{{currentlyRunning.progress}}
</td>
<tr>