I have the below posted radio button and input. I want to toggle the radio button programmatically so that, when I set this.iAreaOfCoverageForThresholdPasser.average-height to true, the radio button should be turned on "highlighted".
HTML:
<div id="idRadioButtonForAverageHeightDivision">
<input [value]="1" [(ngModel)]="iOperationPasser.averageHeight" name="radioGroupForOperations" type="radio" clrCheckbox (change)="onAverageHeightOptionSelected($event)" [(checked)]="averageHeight"/>
<label id="operation-average-height">
{{ "SITE.AREAS_OF_COVERAGE_FOR_THRESHOLD.OPERATION_AVERAGE_HEIGHT" | translate }}
<button class="btn btn-sm btn-icon" (click)="showInformation('SERVICE_DIST_4_AGRI')">
<clr-icon shape="help-info" class="is-solid"></clr-icon>
</button>
</label>
</div>
.html:
<div id="idRadioButtonForAverageHeightDivision">
<input [value]="1"
name="radioGroupForOperations"
type="radio"
clrCheckbox
(change)="onAverageHeightOptionSelected($event)"
[(checked)]="iOperationPasser.averageHeight"
/>
<label id="operation-average-height">
<button class="btn btn-sm btn-icon" (click)="onClick()">
press
</button>
</label>
</div>
.ts
iOperationPasser = {
averageHeight: true
}
onClick = () => {
this.iOperationPasser.averageHeight=!this.iOperationPasser.averageHeight;
}