I would like to remove/hide a few options from a select list that uses ng-options. In my list I have 18 items and I simply want to remove 6 of them from the list but without deleting them (their in my database being used elsewhere). I don't want the user to be able to see them in this list. Is there a way to loop thru and hide them using ng-options?
In my html:
<div class="col-xs-12 col-md-{{model.data.colSize}}" ng-show="model.data.passionPointFilter">
<select class="region-filter form-control"
ng-model="model.selections.passionPoint" ng-options="item.id as item.title for item in model.passionPoints.items">
<option value="">All Interest</option>
</select>
</div>
In my Controller:
if (model.data.passionPointFilter) {
txThingsToDo.loadAll().then(function (thingstodo) {
model.passionPoints.loading = false;
model.passionPoints.items = thingstodo.results;
});
I would like to remove for example the last 3
<select class="region-filter form-control ng-pristine ng-valid ng-touched"
ng-model="model.selections.passionPoint" ng-options="item.id as item.title for item in model.passionPoints.items">
<option value="" class="">All Interest</option>
<option value="0" label="Ranches & Rodeos">Ranches & Rodeos</option>
<option value="1" label="Beaches">Beaches</option>
<option value="2" label="Arts & Culture">Arts & Culture</option>
<option value="3" label="Family">Family</option>
<option value="4" label="Golf">Golf</option>
<option value="5" label="Historic">Historic</option>
</select>