On the screenshot provided below, there are 2 buttons within a mat radio group. The condition is that if modelForm.get('schedule').value equals '1', then only display the radio button with the value 'A'. Otherwise, show all values from stages which include 'A' and 'B'.
How can we achieve this? Is it possible to selectively hide buttons within a loop based on a specific value? Thank you.
#SCREENSHOT https://i.sstatic.net/1RmYP.png
#html
<mat-radio-group [disabled]="!modelForm.get('schedule').value" [(ngModel)]="stage" layout="column">
<mat-radio-button *ngFor="let stage of stages" [value]="stage.text" color="primary">
{{ stage.text }}
</mat-radio-button>
</mat-radio-group>
#TS
stages = [
{id: 0, text: 'A'},
{id: 1, text: 'B'},
]