任何人都可以帮助我选中从后端到前端的单选按钮值。不放置[(ngModel)]
值就可以了。但我想更新获取值,为此,我使用了[[ngModel)]。当我放置[(ngModel)]
时,值没有得到。
<div class="form-group">
<span>Please confirm that you have suitable experience and knowledge to review this article:</span>
<div class="radio">
<label>Yes
<input type="radio" name="content" [(ngModel)]="review.content"
*ngIf="editUserDetails[0].content=='Yes'" value="{{review.content}}" [checked]="true">
<input type="radio" name="content" [(ngModel)]="review.content"
*ngIf="editUserDetails[0].content=='No'" value="{{review.content}}" [checked]="false">
</label>
<label>No
<input type="radio" name="content" [(ngModel)]="review.content"
*ngIf="editUserDetails[0].content=='No'" value="{{review.content}}" [checked]="true">
<input type="radio" name="content" [(ngModel)]="review.content"
*ngIf="editUserDetails[0].content=='Yes'" value="{{review.content}}" [checked]="false">
</label>
</div>
</div>