Angularjs: greater than filter with ng-repeat
问题 I'm applying a greater than filter to a ng-repeat tag. I wrote the following custom filter function: $scope.priceRangeFilter = function (location) { return location.price >= $scope.minPrice; }; and I use it in the following HTML code: <div ng-repeat="m in map.markers | filter:priceRangeFilter"> What is the best way to trigger a refresh of the ng-repeat tag when $scope.minPrice is updated? 回答1: It should be automatic. When $scope.minPrice is changed, the repeater will be automatically updated.