I am attempting to achieve the following:
- Display a list of approximately 50 items using ng-repeat
- Filter the list based on a text field (
)ng-repeat="note in notes|filter:basicFilter"
- If the basic filter returns no results (or a small number, like 5), make an $http call for a deep search in the database
Is there a method to check the results of the filter after the "basic" filter, so I can then initiate an $http call back to the server? Is there a predefined "filter" function in Angular that I can utilize?
I have attempted to monitor the variable:
$scope.$watch('filtered_notes', function() {
// unable to go through with this action
});
Where
ng-repeat="note in filtered_notes = (notes | orderBy:['-note_time']|filter:noteFilter|limitTo:limit)"
However, it results in an error:
Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!