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

182
Visualizações
How to use JS to fulfill the angular form? (Ng-untouched, ng-empty)

I usually use document.getElementById to fill in the form. However, I dont know how to fill in the form with angular. This is the Example:

<div class="control-group">
   <input 
    type="text" 
    class="form-6 form-control ng-pristine ng-untouched ng-valid ng-empty" 
    ng-disabled="error" 
    ng-attr-placeholder="{{placeholderFormodelanswer()}}"
    name="model_answer" 
    ng-model="conditions.customs_modelanswer" 
    placeholder="Please fill in the blank">

----------------------After I click and fill in the form, the class is changed--------------------

class="form-6 form-control ng-valid ng-not-empty ng-dirty ng-valid-parse ng-touched" 

Is there any Javascript (like document.getElementById) can trigger ng-untouched and ng-empty instead of using mouse to trigger ng-untouched to fill in this form? How to use JS to fill in the form and pass the angular checking(ng pristine,ng valid,ng touched,ng dirty)?

Thank you

about 4 years ago · Santiago Trujillo
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