onScroll event for all view?


#1

Hi,

I want to do something with the “onScroll” event on my ionic app

In my root ctrl (on the body tag), i have this :

$scope.$on(’$ionicView.enter’, function (e) {
$ionicScrollDelegate.getScrollView().onScroll = function () {
$log.log(‘ON SCROLL EVENT !’);
};
});

The log work when i scroll, but if i change the view (after a click) and i scroll, the event is not firing…
If i tap on the “back” button and scroll, the log is firing

I’ll be doing something wrong?