Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda