Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

175
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda