角度材料单选按钮在打开角度模态时未选中

时间:2020-02-17 10:56:54

标签: angular angular-material

我们正在使用角形材料垫单选按钮,并且已选择它。在打开角度模态弹出窗口时,此单选按钮不会被选中,而另一套角度材质单选按钮会被选中。

<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}}&nbsp;</span>
                                </mat-radio-button>
                            </mat-radio-group>

```Typescript
this.modalReference = this.modalService.open(loadPlantLocationsContent);

1 个答案:

答案 0 :(得分:0)

如果我正确理解了您的问题,则说明您正在查找默认选中的单选按钮

您可以尝试将以下CSS类添加到单选按钮吗

mat-radio-checked