title: Ionic infinite scroll with dribbble pagination data?
body: <p>I am messing around with ionic and am using dribbble data just to play around. I am not sure how A. I can query dribble to show posts beyond the first 15, the api is here <a href="http://api.dribbble.com/shots/everyone" rel="nofollow">http://api.dribbble.com/shots/everyone</a> and if I want to get more I can request page 2 like <a href="http://api.dribbble.com/shots/everyone?page=2" rel="nofollow">http://api.dribbble.com/shots/everyone?page=2</a></p>
  
  <p>B. How do I pass the items into my template without conflicting with the old items?</p>
  
  <pre><code>/**
   * Dashboard Controller. (must be authenticated)
   *
   */
  .controller('DashController', function($scope, $state, DribbbleData, $http) {
  
    $scope.items = [];
  
    $scope.initialize = function() {
      DribbbleData.getData().then(function(res) {
        console.log(res);
        $scope.items = res.data.shots;
      }, function(status) {
        console.log('error')
      })
    }
  
    $scope.loadMore = function() {
      $http.jsonp('http://api.dribbble.com/shots/everyone?callback=JSON_CALLBACK').success(function(items) {
        console.log(items);
        var test = $scope.items;
        console.log(test)
        //$scope.items = items;
        //useItems(items);
        $scope.$broadcast('scroll.infiniteScrollComplete');
      });
    };
  
    $scope.$on('$stateChangeSuccess', function() {
      $scope.loadMore();
    });
  
    $scope.initialize();
  })
  </code></pre>
  
  <p>The View</p>
  
  <pre><code>&lt;ion-view view-title="Dashboard"&gt;
    &lt;ion-content class="padding"&gt;
  
      &lt;ion-list&gt;
        &lt;div class="list card" data-ng-repeat="item in items"&gt;
          &lt;div class="item item-title"&gt;
            &lt;h2&gt;{{item.title}}&lt;/h2&gt;
          &lt;/div&gt;
          &lt;div class="item item-body"&gt;
            &lt;img class="full-image" ng-src="{{item.image_url}}"&gt;
            &lt;p&gt;
              &lt;a href="#" class="subdued"&gt;{{item.likes_count}} Like&lt;/a&gt;
              &lt;a href="#" class="subdued"&gt;{{item.comments_count}} Comments&lt;/a&gt;
            &lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="item tabs tabs-secondary tabs-icon-left"&gt;
            &lt;a class="tab-item" href="#"&gt;
              &lt;i class="icon ion-thumbsup"&gt;&lt;/i&gt;
              Like
            &lt;/a&gt;
            &lt;a class="tab-item" href="#"&gt;
              &lt;i class="icon ion-chatbox"&gt;&lt;/i&gt;
              Comment
            &lt;/a&gt;
            &lt;a class="tab-item" href="#"&gt;
              &lt;i class="icon ion-share"&gt;&lt;/i&gt;
              Share
            &lt;/a&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/ion-list&gt;
  
      &lt;ion-infinite-scroll on-infinite="loadMore()" distance="1%"&gt;
      &lt;/ion-infinite-scroll&gt;
  
    &lt;/ion-content&gt;
  &lt;/ion-view&gt;
  </code></pre>