Ionic infinite scroll with dribbble pagination data?

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 and if I want to get more I can request page 2 like

B. How do I pass the items into my template without conflicting with the old items?

 * Dashboard Controller. (must be authenticated)
.controller('DashController', function($scope, $state, DribbbleData, $http) {

  $scope.items = [];

  $scope.initialize = function() {
    DribbbleData.getData().then(function(res) {
      $scope.items =;
    }, function(status) {

  $scope.loadMore = function() {
    $http.jsonp('').success(function(items) {
      var test = $scope.items;
      //$scope.items = items;

  $scope.$on('$stateChangeSuccess', function() {


The View

<ion-view view-title="Dashboard">
  <ion-content class="padding">

      <div class="list card" data-ng-repeat="item in items">
        <div class="item item-title">
        <div class="item item-body">
          <img class="full-image" ng-src="{{item.image_url}}">
            <a href="#" class="subdued">{{item.likes_count}} Like</a>
            <a href="#" class="subdued">{{item.comments_count}} Comments</a>
        <div class="item tabs tabs-secondary tabs-icon-left">
          <a class="tab-item" href="#">
            <i class="icon ion-thumbsup"></i>
          <a class="tab-item" href="#">
            <i class="icon ion-chatbox"></i>
          <a class="tab-item" href="#">
            <i class="icon ion-share"></i>

    <ion-infinite-scroll on-infinite="loadMore()" distance="1%">


Source: ajax

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.