The answer appears to be that the two way data binding works if you have an array of objects going to an ng-repeat, but did doesn't work if you have an array of strings.
I wish to provide a UI where users can input multiple recipients. I've got an array of names called "receivers". My thought was I could display a table using ng-repeat, like so:
<table>
<tr ng-repeat = "receiver in receivers">
<td><input type = "text" ng-model = "receiver"></td>
<td><div ng-click = "addRecipient(receiver)">+</div></td>
<td><div ng-click = "deleteRecipient(receiver)">-</div></td>
</tr>
</table>
The problem I'm running in to is that I know of no way to get the contents of "receiver" back to my controller, other than from the calls to addRecipient or deleteRecipient. Which makes it hard for me to use that data.
Any suggestions would be greatly appreciated. If there's a better or "more correct" way to do this, I'd love to see it.
receivers
array doesn't update if you change the value of one of thereceiver
items? err never mind, I think what you are trying to say is you want to add the element from one list into a different list?