51
rated 0 times
[
56]
[
5]
/ answers: 1 / hits: 89909
/ 12 Years ago, sun, january 6, 2013, 12:00:00
I'm trying to generate a set of check-boxes from an object array. I'm aiming to have the check-boxes dynamically map their ng-model to a property of the new object that will be submitted into the array.
What I had in mind is something like
<li ng-repeat=item in items>
<label>{{item.name}}</label>
<input type=checkbox ng-model=newObject.{{item.name}}>
</li>
This doesn't work as can be seen on this JSFiddle:
http://jsfiddle.net/GreenGeorge/NKjXB/2/
Can anybody help?
More From » angularjs