@calendee Thanks, I managed to get a cache mechanism working using $cacheFactory. Works smooth so far. I had a look at other caching solutions mentioned around in the forum (like angular-cache), but I prefer the less complex version for now.
However, the rememberScrollPosition(id) doesn’t work. If you look at the documentation for collection-repeat and ion-scroll for example, they use different markup and aren’t part of the same “family”. collection-repeat seems to be part of the ion-list handling while ion-scroll is something else completely.
The example for collection-repeat doesn’t use an ion-scroll element, but relies on ion-content and a couple of divs. So I can’t attach a delegate-handle attribute to an ion-scroll element. I tried by trial and error: wrapping with ion-scroll, attaching delegate-handle to every possible node (just for fun), but the controller can’t find it:
Delegate for handle “longListScroll” could not find a corresponding element with delegate-handle=“longListScroll”! scrollToRememberedPosition() was not called!
Possible cause: If you are calling scrollToRememberedPosition() immediately, and your element with delegate-handle=“longListScroll” is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to scrollToRememberedPosition() and try again.
if my logic doesn’t completely fail, I think that $ionicScrollDelegate simply doesn’t apply to collection-repeat?
Or do I miss something very obvious?