This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Duplicate names of ngModel fields in form controller not supported. #12200
Open
Description
In 1.0.0rc2, a form supports multiple fields to have the same name.
For example:
<form name="myForm">
<div ng-repeat="item in items">
<input ng-model="item.name" name="name">
</div>
</form>
We can access the array of ngModelControllers by
{{myForm.name}}
But all versions after that, a form can only register a single modelController with the same name.
In the example above, myForm.name is the last item in the items array, which replaces all others.
Is there a way to access a certain group of fields on the form controller level like
{{myForm.name}}
?
I am trying to validate against uniqueness over multiple fields in a form.