I have this function, which I call loadAll()
at the top.
function loadAll() {
UniversalService.GetAll()
.then(function (a) {
$scope.all = a;
});
}
when I use it inside my html I get correct information, but I need these values later in my controller for pagination, so I call it // get current page of items
$scope.items = $scope.all.slice(vm.pager.startIndex, vm.pager.endIndex + 1);
But I dont't get any values.