Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
How to turn-on a radio button programmatically

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>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

.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;
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!