ng-selectize
ng-selectize copied to clipboard
filter available options
I'd like to filter the listed options from ng-selectize. For a "normal" <select> I do it like this:
$scope.objects = [ ... ];
$scope.myFilters = {type:'tv', country:'Austria'};
<select ng-model="selectedObject" >
<option ng-repeat="o in objects | filter:myFilters:strict">{{o.name}}</option>
</select>
Now with ng-selectize I do not have the <option>-tags because they are generated from the variable given in the options attribute
<select selectize="" options="objects" ng-model="selectedObject" ng-disabled="disabled"></select>
Is there a way how I can still do this with ng-selectize?
Have you tried changing options="objects" to options="filteredObjects"?
In theory the two way binding should do the trick, or bind to a function that returns a filtered collection.