I am trying to filter rows returned and having a problem.
I have the following:
<tr
data-ng-show="grid.data.length > 0"
data-ng-repeat="row in grid.data | filter:isProblemIdInRange>
<td>{{ row.problemId }}</td>
In my controller I have:
$scope.isProblemIdInRange = function (row) {
return row.problemId >= $scope.lower && row.problemId < $scope.upper;
};
I have input fields:
<input type="text" data-ng-model="$scope.lower" />
<input type="text" data-ng-model="$scope.upper" />
My problem is that whatever I enter into the two inputs there is nothing that comes back. When I remove the filter then all is okay
Remove the $scope
<input type="text" data-ng-model="lower" />
<input type="text" data-ng-model="upper" />
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments