i’ve got an angular app that maps one set of objects to another set of objects via two select elements.
when a mapping is made, the mapped objects’ “mapped” property gets set to true.
<select ng-model='sourceToMap' required='true' ng-options='code.code for code in sourceCodes'>
<select ng-model='targetToMap' required='true' ng-options='code.code for code in targetCodes'></select>
i’d like my select to show all the items in sourceCodes/targetCodes whose mapped property is false. something like…
ng-options="code.code for code in sourceCodes where code.mapped = false"
if possible, i’d like to avoid having a mappedItems / unmappedItems collection cause that seems really gross
Use a filter, like this:
jsFiddle: http://jsfiddle.net/bmleite/T97DN/