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
- Switch to JSONp to avoid CORS restraints
- Use instagram's
min_tag_id
andmax_tag_id
format - Update the
getOldPhotos()
method to automatically return an empty array when there is nonext_max_tag_id
(Technically, it returns a different promise that's already resolved to an empty array.) - 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"