I would like to use on-scroll
event, but not using the on-scroll
attribute , is there someway to do this?
Something like:
$ionicScrollDelegate.$on('onScroll', function (data) {
console.log(data.position.top); // etc...
});
Or using $scope…
$scope.$on('ionicView.onScroll', function (data) {
console.log(data.position.top); // etc...
});
Thanks.
I solved this using:
$ionicScrollDelegate.getScrollView().onScroll = function () {
console.log($ionicScrollDelegate.getScrollPosition());
});
Would be great if these function of getScrollView()
as onScroll
was documented.
Thanks
1 Like
Corvi
January 18, 2016, 1:01am
4
unfortunately this has stopped working with I think 1.2.4. (works for sure with 1.1.1). it still works in desktop browser, but no longer on an android phone.
anyone got a solution?