The problem seems to be in the way how ng-model
works with input
and overwrites the name
object, making it lost for ng-repeat
.
As a workaround, one can use the following code:
<div ng-repeat="name in names">
Value: {{name}}
<input ng-model="names[$index]">
</div>
Hope it helps