Tomáš Fejfar Tomáš Fejfar - 9 months ago 68
Javascript Question

Hidden fields in AngularJs

How do I access hidden fields in angular? I have an app, where I want to submit a form for each of items in the list. The form is simple - it has submit button and a hidden field holding the ID value. But it does not work. The value is empty.

I updated the default angular example to display the situation - the todo text is in hidden field.


In your simpler fiddle, the problem can be fixed by using ng-init or setting an initial value in the controller. The value attribute won't effect the ng-model.

Also, your initial example ( works for me in its current state on Chrome 15/Windows 7.