Either you write a new filter service that handles a special case when search.$
empty, or you could maybe do something like this (untested):
<a ... ng-repeat="trip in (search.$ ? (trips | filter:search | limitTo:-15) : [])">
Question
At the moment i have a ng repeat, that repeat a set of results.
<a class="list-group-item" href="#trip/{{trip.id}}/overview" ng-repeat="trip in trips | filter:search | limitTo:-15">
Basicly my list shrinks the more i enter stuff in my input field
<input type="text" ng-model="search.$" class="form-control input-lg">
What i want to achieve is that i have a result set of 0 items at start. end the more i type into the ng-model input field the more or less items matched show up.
is there a filter for that or something to achieve my goal?
thx
Solution
Either you write a new filter service that handles a special case when search.$
empty, or you could maybe do something like this (untested):
<a ... ng-repeat="trip in (search.$ ? (trips | filter:search | limitTo:-15) : [])">