Angular: Set value of text input without creating a model

1.1k Views Asked by At

I have a form that lives inside an ng-repeat. I'm not using ng-model on the form because I don't think there is a need just yet (it's not an AJAX form). I want to set the default value of one of my text input fields to the value of j.some_attribute, where j is the current iteration of ng-repeat. I've tried value="{{j.some_attribute}}" and ng-value="j.some_attribute", but neither one works. When the form is submitted, the value for that field is blank. Is there a way to set the default value of a text input without creating a form model on the scope?

0

There are 0 best solutions below