You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
932 B

  1. angular.module('app.userTravels', ['pascalprecht.translate'])
  2. .controller('UserTravelsCtrl', function($scope, $http, $ionicModal,
  3. $timeout, $ionicLoading, $filter, $stateParams) {
  4. $scope.storageuser = JSON.parse(localStorage.getItem("cim_app_userdata"));
  5. $scope.travels=[];
  6. $scope.joins=[];
  7. $scope.doRefresh = function(){
  8. $http.get(urlapi + 'users/id/travels/'+$stateParams.userid)
  9. .then(function(data, status, headers,config){
  10. console.log('data success');
  11. console.log(data);
  12. $scope.travels = data.data.travels;
  13. $scope.joins = data.data.joins;
  14. $scope.$broadcast('scroll.refreshComplete');//refresher stop
  15. },function(data, status, headers,config){
  16. console.log('data error');
  17. $scope.$broadcast('scroll.refreshComplete');//refresher stop
  18. });
  19. };
  20. $scope.doRefresh();
  21. });