动态生成表单,我想引用给定表单的formControlname,但是在我尝试的时候
<div class="license" *ngFor="let license of licenses; let i = index;">
<form [formGroup]="licenses[i]">
<button (click)="removeLicense(i)" class="remove">
<generic-icon name="close"></generic-icon>
</button>
<div class="select margin-top">
<generic-select
formControlName="status"
></generic-select>
</div>
</form>
</div>
它以这种方式工作,但是随后的每个表格都具有相同的值
我也尝试过,但是不起作用
[formControlName]="licenses[i].status"
[formControlName]="license[i].status"
[formControlName]="license.status