Plunk: http://plnkr.co/edit/Y4ntAj2fIIpexKjkCvlD?p=preview
I am trying to create a form component that allows the user to create multiple instances of a specific data field, but to populate them from one set of inputs.
I create a radio button for each of the elements in the set, using ng-repeat, after which each switch will have a value $indexfrom repeat. The radio buttons are modeled on $scope.selectedItem, which is used to indicate the inputs to the right element.
For some reason, however, it selectedItemnever changes, even if the selected state of the switches.
I tried a similar thing with static switches, and it worked fine, which makes me think that there is a problem with the ng-modelinside ng-repeat.
source
share