mat radio button checked not working code example
Example: mat-radio-button checked not working
/* Use a FormControl instead
*
* <mat-radio-group [formControl]="radioFormControl">
* <mat-radio-button [value]="1">Option 1</mat-radio-button>
* <mat-radio-button [value]="2">Option 2</mat-radio-button>
* </mat-radio-group>
*/
@Component({})
export class RadioOverviewExample implements OnInit {
readonly radioFormControl = new FormControl(null);
ngOnInit() {
this.radioFormControl.setValue(1);
}
}