I have a simple form showing data from a REST server. One of the fields is a boolean but can be null. My UI has a mat-radio-group with two mat-radio-button elements, one with value "true" and one with value "false". I would expect that if it was null, neither would be on, and clicking one would set the value to true or false. However, it doesn't do anything at all.
I tried using ng-value instead of value, but that didn't have any effect.
<mat-radio-group [(ngModel)]="canBeTrueFalseOrNull">
<mat-radio-button value="true">yes</mat-radio-button>
<mat-radio-button value="false">no</mat-radio-button>
</mat-radio-group>
I supposed a can transform the data from the server into strings and then change it back again when I update it, but that seems overly complex. Is there an easier way to do this?