Ion Infinite Scroll caching


Hello Guys

Has anyone ever implemented ion infinite scroll with caching.I am using ion infinite scroll for pulling hundreds of records.when it comes back from detail page to list page it is again pulling records from beginning.

i have used cachefactory to store the data,but the problem is getting delay to show the cached value.for eg

i have 100 items i clicked on 55 th item ,it goes to detail page .when i press back button it comes to item 1 and show the 55th item.there is a small delay.

Please give me a suggestion how can i implement it.



You keep each item in a service instead of on your controller so that it persists. Then you bind the service to your scope with something like $scope.MyService = MyService so that when you update the service it updates your $scope too. If you need more help let me know.