|
@ -4,14 +4,15 @@ angular.module('app.travels', ['pascalprecht.translate']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.travels=[]; |
|
|
$scope.travels=[]; |
|
|
|
|
|
|
|
|
|
|
|
$scope.page=0; |
|
|
$scope.doRefresh = function() { |
|
|
$scope.doRefresh = function() { |
|
|
/* travels refresh: */ |
|
|
/* travels refresh: */ |
|
|
$http.get(urlapi + 'travels') |
|
|
|
|
|
|
|
|
$http.get(urlapi + 'travels?page=' + $scope.page) |
|
|
.then(function(data){ |
|
|
.then(function(data){ |
|
|
console.log('data success travels'); |
|
|
console.log('data success travels'); |
|
|
console.log(data); // for browser console
|
|
|
console.log(data); // for browser console
|
|
|
$scope.travels = data.data; // for UI
|
|
|
|
|
|
|
|
|
//$scope.travels = data.data; // for UI
|
|
|
|
|
|
$scope.travels=$scope.travels.concat(data.data); |
|
|
$scope.$broadcast('scroll.refreshComplete');//refresher stop
|
|
|
$scope.$broadcast('scroll.refreshComplete');//refresher stop
|
|
|
|
|
|
|
|
|
}, function(data){ |
|
|
}, function(data){ |
|
@ -22,4 +23,10 @@ angular.module('app.travels', ['pascalprecht.translate']) |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|
$scope.doRefresh(); |
|
|
$scope.doRefresh(); |
|
|
|
|
|
|
|
|
|
|
|
$scope.paginationNext = function(){ |
|
|
|
|
|
$scope.page++; |
|
|
|
|
|
console.log($scope.page); |
|
|
|
|
|
$scope.doRefresh(); |
|
|
|
|
|
}; |
|
|
}); |
|
|
}); |