You can use nested forms, e.g. ng-form="formNameHere" on the element you 
are ngRepeat-ing.
Inside of the ng-repeat template, you can refer to the form as 
`formNameHere` (or whatever name you have it) which doesn't have to be 
unique for each iteration.

So, for example, you can do `formNameHere.inputNameHere.$invalid` inside 
the HTML and it will work for each ngRepeated item separately.

On Sunday, February 16, 2014 2:35:14 AM UTC+2, P Stockton wrote:
>
> Am trying to make a form using ng-repeat so  the 'name' attribute needs to 
> bind like so:
>
> <input id="{{inputs.name}}" name="{{inputs.name}}"...
>
> but it doesn't appear to work. 
>
> This does though:
>
> <input id="{{inputs.name}}" name="eventName"....
>
> I've looked around at old posts and got myself nice and baffled. 
>
> Nested forms? 
>
> Please point me in the right direction. No fiddle or plunker yet, just 
> trying to get an  'it's possible" or "it isn't worth it".
>
> Thanks and have a good one!
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to