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

177
Views
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
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!