angular-paginate-anything
angular-paginate-anything copied to clipboard
reload-page never works , gotopage also never works...
is it because reload-page and gotopage are isolated scope ?
Hmm, there is a passing test for this here: https://github.com/begriffs/angular-paginate-anything/blob/master/test/paginate-anything-spec.js#L411-L421
Can you give me more information about your code and situation?
would you please give me more samples how to use reload-page ?
in template
<bgf-paginationpage="page" per-page="generalPerPage"
client-limit="clientLimit"
collection="gqs"
url = "generalPageUrl"
repload-page = "reloadPageFlag"
passive = 'false'
template-url="/templates/directive/paginate-anything.html">
</bgf-pagination>
In controller
SomeService.updateSomething({},function(data){
$scope.reloadPageFlag = true;
})
Above code doesn't reload page, when updateSomething callback is called.
It was my mistake. repload-page = "reloadPageFlag", misspelling. repload.
However i found one more issue. reload page doesn't work several times.... It works only one time.
Maybe you have to toggle it from true to false and back to true in order to get another reload.
In your code, I saw it you already toggle it false.
$scope.$watch('reloadPage', function(newVal, oldVal) {
if($scope.passive === 'true') { return; }
if(newVal === true && oldVal === false) {
$scope.reloadPage = false;
requestRange({
from: $scope.page * $scope.perPage,
to: ($scope.page+1) * $scope.perPage - 1
});
}
});