So I have an object like this:
class FileData {
file: File;
description: string;
}
In my components.ts I have an array of this object that contains an unknown amount. My component.html looks like this:
<tr *ngFor="let file of fileArray">
<td>
<input type="text" class="form-control" [(value)]="file.description" placeholder="Description">
</td>
<td>
<input type="text" class="form-control" [(value)]="file.file.name" placeholder="File name">
</td>
</tr>
My goal was that I can change the values of each property within the array with two way binding but this doesn't work.
Whats the right way to do this?
(Usecase: The Array contains X Elements. each one hase a file but no desciption. I want to fill the description or Change the file name)