javascript - ng-option within ng-repeat how do I update the model not to include a selected value from another select box -
difficult question put words have ng-option select box within ng-repeat. in current situation causes select box appear 3 times option can used on 3 different things.
if select value first select box need removed other 2.
here jsfiddle primitive example of issue
<select ng-options="item item.name item in test" ng-model="test.name">
jsfiddle: http://plnkr.co/edit/inrm2zuoc7hehshgps9p?p=preview
thanks in advance
you can use filter in ng-repeat exclude selected options.
<select ng-options="item item.name item in test | filter:'!'+selected" ng-model="test.name">
Comments
Post a Comment