更新时间:2023-12-06 12:50:04
从
[formArrayName]="areas"
并且仅使用
formArrayName="areas"
这是因为您正在尝试使用[ ]
绑定变量,而实际上并没有.还要注意您的提交,应该是:
This, because with [ ]
you are trying to bind a variable, which this is not. Also notice your submit, it should be:
(ngSubmit)="onSubmit(areasForm.value)"
而不是areasForm.values
.