Fix this Angular 4 error in reactive forms by removing some brackets. Something like this...
<tr *ngFor="let lineItem of presidentsForm.get('lineItems').controls; let i=index"
[formGroupName]="i">
<td><input type="text" [formControlName]="name" /></td>
<td><input type="text" [formControlName]="party" /></td>
<td><input type="checkbox" [formControlName]="hasNonconsecutiveTerms" /></td>
</tr>
...needs to become something like this:
<tr *ngFor="let lineItem of presidentsForm.get('lineItems').controls; let i=index"
[formGroupName]="i">
<td><input type="text" formControlName="name" /></td>
<td><input type="text" formControlName="party" /></td>
<td><input type="checkbox" formControlName="hasNonconsecutiveTerms" /></td>
</tr>
No comments:
Post a Comment