i have to following issue. I have an nested ng-repeat with two radio-buttons, when i select an radion-button the value is set correctly to the model. But when i filter to a value that's not in the collection the value is not set to the view (the model is still correct)
to reproduce:
when you check all 3 radio-buttons to lets say 'read', than type 'x' into the input to filter, now remove the value from the input. the last radio is selected the others are not.
ps. i've tryed ng-value instead of value.
controller:
vm.list = [{id: 1, name: 'Item1', items: [{id: 1, name: 'SubItem1.1'}, {id: 2, name: 'SubItem1.2'}, {id: 3, name: 'SubItem1.3'}]}]
view:
<input type="text" ng-model="search" />
<ul>
<li ng-repeat="item in vm.list">
<h4 ng-bind="item.name"></h4>
<ul>
<li ng-repeat="subitem in item.items | filter:search">
<h4 ng-bind="subitem.name"></h4>
<input type="radio" name="{{item.id}}{{subitem.id}}" ng-model="subitem.permission" value="read" /> Read
<input type="radio" name="{{item.id}}{{subitem.id}}" ng-model="subitem.permission" value="write" /> Write
</li>
</ul>
</li>