I have a table on my page that is populated like this:
<tr data-ng-repeat="row in grid.view = (grid.data | filter:isProblemInRange )">
I have the following function:
$scope.gridReset = function () {
$scope.grid.data = angular.copy($scope.grid.backup);
$scope.gridForm.$setPristine();
};
The function replaces the data in $scope.grid.data with a backup.
When it runs the angular.copy seems to take no time to run but the data on the screen takes about 5 seconds before I see it changing to the backup copy. Is there anything I could do to speed this up?
Here's the function isProblemInRange:
$scope.isProblemInRange = function (row) {
return (row.problemId >= $scope.pidLower || $scope.pidLower == null || $scope.pidLower == "") &&
(row.problemId < $scope.pidUpper || $scope.pidUpper == null || $scope.pidUpper == "")
};
I have approximately 500 rows in the grid.data