fixed a bug with pagination
This commit is contained in:
parent
04f0192a1b
commit
0e027eb037
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue