Have you any idea why the radio buttons are not showing when the page loads? I am using angular material mat-radio-buttons.
CodePudding user response:
You've added formControlName
to both mat-radio-group
and mat-radio-button
elements, while it should only be added to the mat-radio-group
:
<mat-radio-group
aria-labelledby="example-radio-group-label"
formControlName="seasonsForm"
>
<mat-radio-button
*ngFor="let season of seasons"
[value]="season"
>
{{ season }}
</mat-radio-button>
</mat-radio-group>