How do I access value of ItemName in HTML. It says undefined when I try {{invoiceForm.controls[i].items.controls.itemName.value | json}}
in below code.
<form [formGroup]="invoiceForm">
<div formArrayName="items" *ngFor="let item of items.controls; let i=index;">
<div [formGroupName]="i">
<input type="text" formControlName="itemName">
<input type="number" formControlName="itemQty">
<input type="number" formControlName="itemPrice">
</div>
Item name: {{invoiceForm.controls[i].items.controls.itemName.value | json}}
</div>
</form>