问题
I have designed my form till here. Now I further want to show the amount of the particular row over there in the row in Amounts column.
<input type="text" class="form-control" formControlName="itemamt" readonly value="{{itemrow.get('itemqty').value * itemrow.get('itemrate').value}}">
回答1:
To pass FormControll Value inside FormArray you can do something like this with angular,
form = new FormGroup({
name: new FormControl('Name'),
username: new FormArray([
new FormControl("value"),
{firstName:"Andrew", lastName:"Donald"},
{firstName:"Charles", lastName:"Jackson"}
])
});
Hope this might be helpfull for you.
来源:https://stackoverflow.com/questions/43543721/display-value-inside-input