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.

21 lines
849 B

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