我需要用formarray
动态生成的其他形式进行一些计算,但是它仅适用于第一个。请如何使它适用于其他表格?
这是我的代码
let control = this.proposalForm.controls.proposals['controls'][0];
this.proposalForm.get('TotalProposedAmount').valueChanges.subscribe(val => {
this.originalBalance = val;
console.log(val)
})
control.controls['ProposedAmount'].valueChanges.subscribe(value => {
this.details.CurrentBalance = this.originalBalance - value;
this.latestOutstandingBalance = this.details.CurrentBalance;
})