Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding selected items
Message
 
 
To
All
General information
Forum:
Javascript
Category:
Other
Title:
Excluding selected items
Miscellaneous
Thread ID:
01626449
Message ID:
01626449
Views:
37
Hi everybody,

I found this link http://christian.fei.ninja/Angular-Filter-already-selected-items-from-ng-options/

I've defined the following so far:
<div class="col-md-4">
                <select class="form-control" ng-model="newLink.groupNo"
                        name="groupNo" id="groupNo" 
                        ng-options="t.value as t.text for t in metaData.spGroups"></select>
            </div>
I need to only allow to select groups which are not already in the $scope.currentSChannels.scgsLink.groupNo column.

I originally tried
| filter:{ value : !currentSChannels.scsgLink.groupNo }
but then my drop down came empty.

I see in the blog by that author that he implements custom excludeFrom filter and passes an array of things. But how exactly that works? Does it check each value from all columns in the first array against values in all columns of the second array? How can I change the above to make sure that only value (or newLink.groupNo) is checked against groupNo column and not all other columns of the array are checked?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform