RadioButton checked does not work with value is a number
This is my test code:
**
<mat-radio-button class="example-radio-button" [checked]="true" [value]="12">
Radio Test
**
**
<mat-radio-button class="example-radio-button" [checked]="true" [value]="ThisIsAString">
Radio Test
**

version info: "@angular/core": "5.2.7", "@angular/forms": "5.2.7", "@angular/material": "^5.2.4", "@angular/cdk": "^5.2.4", "typescript": "2.6.2"
Please tell me what went wrong
This is due to the radios having the same name property value. According to the docs:
All radio-buttons with the same name comprise a set from which only one may be selected at a time.
If you want both radios to be selected at the same time, add a name property to both radio elements with a different value.
I think it's two differents code, not two buttons on the same page with the same name.
OK , Thanks
@DevilHeS I was seeing the same thing where I had a let list of radio buttons and only one was checked, but it was because of the names being the same 😄
<mat-radio-group [(ngModel)]="selectzhan" (change)="onSelectionChange($event)">
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.