When working with AngularJS, I've noticed that I can easily bind text inputs to elements within arrays:
<input type="text" ng-model="foo[2]" />
Is this a feature provided by AngularJS or simply happening by coincidence?
However, when attempting to bind select
elements or checkbox inputs to array elements, they do not seem to function properly - for example, the select
element does not update the displayed value upon selection and the checkbox remains unchecked even after being clicked.
Could there be something that I am overlooking in my code?
Update: Interestingly, it seems to work perfectly fine in JSFiddle: http://jsfiddle.net/azFzc/