angular - 在 IE11 中更新 ngModel 后触发 ngbRadioGroup 点击事件
问题描述
我正在使用 a ngbRadioGroup
,并且单选组中的每个输入都有一个单击事件,以便可以取消选择输入:
<div ngbRadioGroup class="btn-group-toggle" name="myGroup" [(ngModel)]="myModel" [disabled]="this.hasSubmittedAnswer">
<label ngbButtonLabel *ngFor="let choice of currentActivity.choices" class="btn btn-outline-primary btn-lg mr-2">
<input ngbButton type="radio" [value]="choice" (click)="onAnswerSelected(choice)"> {{ choice }}
</label>
</div>
在 Chrome 73 中,点击事件会在模型更新之前触发。在 IE11 中,“myModel”在“onAnswerSelected”触发之前更新。
有什么方法可以在 IE11 中更新模型之前触发事件?
解决方案
推荐阅读
- python - PyCharm 无法识别与 python3.7 解释器位于同一目录中的 py 文件的导入
- teamcity - 2 Teamcity Web应用访问git仓库有问题
- jquery - WordPress 插件不工作 - Jquery 显示错误
- python - Optimize.minimize 初始猜测
- c# - 时间:2019-04-10 标签:c#async udp server closes after initiating
- javascript - 使用 rows.add + aoColumnDefs 更新数据表?
- augmented-reality - 如何降低简单平面上的敏感度或跳跃性?
- java - 浏览具有特定点的数组
- tableau-api - Tableau:仪表板参数
- c# - 使用 Dllimport 将一个非常大的字符串作为字节数组从 C++ 传递到 C#