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

183
Vistas
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 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