angular - 打开角度模态弹出窗口时未选中角度材料单选按钮
问题描述
我们正在使用 angular material mat 单选按钮,它被选中。此单选按钮在使用另一组角度材料单选按钮打开角度模态弹出窗口时未选中。
<mat-radio-group class="example-radio-group" formControlName="selectedToRole" [name]="selectedRole" >
<mat-radio-button *ngFor="let item of rolesForTransferToRadio" [value]="item.role" (change)="displayBasedOnSelectedRole(item.role)">
<span class="labelFontsValue col-md-3">{{item.roleCode}} </span>
</mat-radio-button>
</mat-radio-group>
```Typescript
this.modalReference = this.modalService.open(loadPlantLocationsContent);
解决方案
如果我正确理解您的问题,您正在寻找默认选择的单选按钮
您可以尝试将以下 CSS 类添加到单选按钮吗
mat-radio-checked
推荐阅读
- android - 从firebase存储下载时加密文件?
- kubernetes - Kubernetes IP 服务 IP 和端口
- java - 如何为Java中的方法设置特定的返回类型
- python - 如果满足某些条件,如何将某些项目从列表中获取到另一个列表?
- ios - IOS 10 VS IOS > 10 AVPlayerViewController 旋转问题
- vb.net - 在 finally 块中抛出新异常总是被调用
- c - WinApi SetFileAttributes 慢动作调用
- jmeter - jmeter 中的平均值大于 95 个百分位
- c++ - CMake - 如何继承静态库包含和依赖项?
- rest - javax.ws.rs.RedirectionException:在 JavaEE 中执行 POST 请求后发现 HTTP 302