我正在從我從後端得到的數據中創建一個可編輯表格,現在我想保存已更新的數據。 我一直在使用formControl嘗試,但它只能保存在最後一列 這裏的數據是我的代碼保存表數據角度2從ng創建
<form [formGroup]="pagesForm">
<tr *ngFor="let data of pagesArray; let i = index; trackBy: trackByFn">
<td style="text-align: center;" >
<input type="text" formControlName="nameControl" value=[data.name]>
</td>
<td style="text-align: center;">
<input type="text" formControlName="descriptionControl"
vaue=[data.description]>
</td>
</tr>
<button class="btn btn-common" (click)="submit(pagesForm)">Save</button>
</form>
誰能幫我在批量保存此表的數據
vaue = data.name] missing「[」 – ShadowFoOrm
vaue = value /拼寫錯誤? – ShadowFoOrm
感謝您的更正你能幫我在這 –