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