fixed a bug with pagination

This commit is contained in:
Michele Artini 2022-12-19 09:26:46 +01:00
parent 04f0192a1b
commit 0e027eb037
1 changed files with 4 additions and 4 deletions

View File

@ -50,8 +50,8 @@
} }
$scope.search = function(field, value) { $scope.search = function(field, value) {
var path = "/results/"; var path = "/results";
if (field) { path += encodeURIComponent(field); } if (field) { path += '/' + encodeURIComponent(field); }
path += '/0/' + pageSize(); path += '/0/' + pageSize();
$timeout(function() { $timeout(function() {
@ -86,8 +86,8 @@
$scope.gotoPage = function(page) { $scope.gotoPage = function(page) {
$scope.results = []; $scope.results = [];
var path = "/results/"; var path = "/results";
if ($scope.field) { path += encodeURIComponent($scope.field); } if ($scope.field) { path += '/' + encodeURIComponent($scope.field); }
path += '/' + page + '/' + $scope.pageSize; path += '/' + page + '/' + $scope.pageSize;
$location.path(path).search('value', $scope.value); $location.path(path).search('value', $scope.value);
} }