我的代码HTML
<select class="form-control form-control-sm" formControlName="categoryId" [value]="valueForm.categoryId">
<option *ngFor="let category of categories" value="{{category.id}}">
{{category.categoryName}}
</option>
</select>
仅成功传递第一个值。由于ngfor尚未加载,因此无法传递以下值
这是我的HTMl广播复选框
<div class="form-check pr-4">
<input class="form-check-input" type="radio" value="1"
formControlName="sellerId">
<label class="form-check-label">
seller 1
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" value="2"
formControlName="sellerId">
<label class="form-check-label">
seller 2
</label>
</div>