Hi there,
I am trying to get the on-scroll event with ion-scroll (with ionic 0.9.27):
<div class="photos"> <!-- has "controller: PhotosCtrl as photosctrl" in state definition -->
<ion-content class="thumbscontainer" scroll="false">
<div class="row">
<div class="col col-bottom">
<ion-scroll direction="x" class="thumbsscroller" on-scroll="photosctrl.checkImages()">
<div class="thumbs" ng-repeat="thumb in thumbs" item="thumb">
<img class="thumb" lazy-src="{{thumb}}" ng-click="photosctrl.selectImage(thumb)"/>
</div>
</ion-scroll>
</div>
</div>
</ion-content>
</div>
While the scrolling actually works as expected, the on-scroll event does not fire (The source code says
/**
* @ngdoc directive
* @name ionScroll
...
* @param {expression=} on-scroll Called whenever the user scrolls.
...
)
The only way I found is a bad hack:
<ion-scroll direction="x" class="thumbsscroller" onscroll="window.checkImages()">
using onscroll
instead on-scroll
with checkImages added to global window
object as function.
How do I get on-scroll working?
Thanks
Bernhard