我有一个包含产品formArray的FormGroup (可以添加或删除的动态控件): FormGroup { products (FormArray) {summary.value: 5}...there can be N of these controls... }
} 预期摘要我做了什么,但没有像预期的那样工作: calculateAllSumm
textRelease()"[{ngModel}]="this.getCaptionDetail.value.caption">{{this.getDetailText.caption}} let detailArray =
this.detailsControl.controls[this.selectedHour] as FormArray我希望能够通过获取</em
当我试图循环formArray的控件时,我得到一个错误,formControlName必须在formGroup中,但我在formArray中没有formGroup。html中的代码如下所示 enter image description here 在.ts中是这样的 enter image description here 当我没有formGroup但Angular想要提供formGroup时,我该如何解决这个问题
我有4个输入,它们是使用循环生成的。我为UI使用了angular表单,但问题是我只能获得最后一个输入值,并且要求我需要所有的输入值,前提是我不能生成formControlName动态。有没有办法绕过只获取最后一个值而获取所有值的方法?同样的代码是(这个循环将基于dataArr执行,这里假设它执行了4次): <div *ngFor = "let data of dataArrf