Похоже, что вы хотите отобразить проверенное значение, попробуйте обратиться к следующему коду и использовать модель для получения проверенного значения.
<mat-radio-group [(ngModel)]="rdoSeason" aria-label="Select an option">
<mat-radio-button [value]="1">Option 1</mat-radio-button>
<mat-radio-button [value]="2">Option 2</mat-radio-button>
<mat-radio-button [value]="3">Option 3</mat-radio-button>
</mat-radio-group>
<div>You select Option: {{rdoSeason}}</div>
Код в файле .ts:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-material-radiobutton',
templateUrl: './material-radiobutton.component.html',
styleUrls: ['./material-radiobutton.component.css']
})
export class MaterialRadiobuttonComponent implements OnInit {
constructor() { }
ngOnInit() {
}
rdoSeason:string;
}
результат как показано ниже:
![enter image description here](https://i.stack.imgur.com/XN6rI.gif)
Подробнее об использовании метки переключателя, отметьте эту статью .