This is my Angular2 application with input fields inside table. My data is displaying on select
tag but the data binded using ngModel
on input
tag is not been displayed in input
field.
<form name="userForm">
<table>
<tr *ngFor="let item of itemList; let in =index">
<td><select><option >{{item.FirstName}}</option></select></td>
<td><input type="text" id="lastname" name="lastname" [(ngModel)]="itemList[in].lastname"></td>
<td><input type="text" id="middlename" name="middlename" [(ngModel)]="itemList[in].middlename"></td>
</tr>
</table>
</form>