I have a form where there are many inputs fields type="text" and I would need some of the inputs where its value should be populated using clickevent. So I gave a classname for specific inputs which is specialinputs.
Below is the input field
<input type="text" class="specialinputs" ngvalue="DataFields1"
ngmodel="DataFields1">
</input>
Below is the javascript code
var myinputs = document.getElementsByClassName("specialinputs")
for (i = 0; i < myinputs.length; i++) {
myinputs[i].value = "Mytext";
}
This works,Mytext is being populated. but my input field ng-model is not getting updated, when i save the form , the values are not getting saved. Iam using angularjs