Q:

How to list all elements of an array of object in a table using ngFor directive in angular?

I have to display an array of objects data into a table. 
I have tried this code:
    <tr *ngFor="let item of fetchedMails">
      <td><input name="name" [(ngModel)]="item.full_name"></td>
      <td><input name="email" [(ngModel)]="item.email"></td>
    </tr>

Where fetchedMails is the array of objects
I have used 2-way binding so that the user could able to edit the name and re-submit the form.
But in the table, I could only get the last element of the array repeated n times.
How can I display every array element in the table?

A:

Try below solution.. Just remove name Attribute and replace it with ngModelOptions

<tr *ngFor="let item of fetchedMails">
  <td><input [ngModelOptions]="{standalone: true}" [(ngModel)]="item.full_name"></td>
  <td><input [ngModelOptions]="{standalone: true}" [(ngModel)]="item.email"></td>
</tr>

