【发布时间】:2020-04-05 01:38:15
【问题描述】:
我有单选按钮:
<mat-radio-group [ngModel]="model">
<mat-radio-button *ngFor="let d of ['a', 'b']" [value]="d" (change)="change()">
{{ d }}
</mat-radio-button>
</mat-radio-group>
方法是:
public change(): void {
console.log(this.model);
}
为什么当我更改收音机时,敌人示例点击 a 元素我在控制台中得到 b 元素?
【问题讨论】: