Infinite-scroll


#1

Please, help me!

I don’t understand why this code doesn’t work!

controller('Avax', function ($scope, $http) {
  $http.get('site.com/press_center/video/ayax.php').success(function(data) {
    $scope.items = data;
 //load first page
  $scope.loadMore = function() {
    $http.get('site.com/press_center/video/ayax.php?PAGEN_1=2').success(function(items) {
      $scope.items = $scope.items.concat(data);
      $scope.$broadcast('scroll.infiniteScrollComplete');
    });
  };
//load 2+ pages
  $scope.$on('$stateChangeSuccess', function() {
    $scope.loadMore();
  }); });
})