Skip to content Skip to sidebar Skip to footer

Instagram Feed With Ionic Framework Infinite-scroll Doesn't Stop Duplicates In Repeater Error

I'm trying to build an IOS and android app with Ionic Framework that has an Instagram Feed with the instagram api that shows all photos shared by hashtag (I'll use the hashtag choc

Solution 1:

We solved this separately, but I figured I'd post the answer here too. The main changes are

  1. Switch to JSONp to avoid CORS restraints
  2. Use instagram's min_tag_id and max_tag_id format
  3. Update the getOldPhotos() method to automatically return an empty array when there is no next_max_tag_id (Technically, it returns a different promise that's already resolved to an empty array.)
  4. Change $scope.loadMore() to check for an empty response and set a flag to kill the <ion-infinite-scroll>

See a full working copy here: http://plnkr.co/edit/LBW0pp?p=preview

Post a Comment for "Instagram Feed With Ionic Framework Infinite-scroll Doesn't Stop Duplicates In Repeater Error"