I use the ngOptions directive in the HTML below:
<select ng-model="selectedGroupToShow.Id" ng-options="g.Id as g.Name for g in myGroups"> <option value>-- All --</option> </select>
The filter that I use in ng-repeat to show my data is as follows:
filter:{GroupId:selectedGroupToShow.Id}"
Even if I use
filter:selectedGroupToShow
the problem remains the same. Filter check.
This works fine, but when I want to clear the filter (select the default option βAllβ), it will only display data that does not have the GroupId parameter set.
How can I show ALL data (clear the filter) when I select the element of the default element within the selection?
angularjs angularjs-filter
trainoasis
source share