$ionicScrollDelegate an bottom of the scroll

Hi all,
I have a ion-modal-view with a ion-content inside and i wanna know if the user reach the bottom of the scroll to enable a button, but I dont see the proper way to implement this…

In my directive I have this code:

scope.checkBottomReached = function() {
var contentDelegate = $ionicScrollDelegate.$getByHandle(‘contentHandler’);

};

I can check there the contentDelegate.getScrollPosition().top and everything looks right but I dont know how to check if the bottom is has been reached…

Am I missing something??

Cheers
Andoni

$ionicScrollDelegate does not really offer a ready to use method to check that.

Here is how you do it in Ionic using _maxScrollTop.

http://www.yourtechchick.com/how-to-detect-scroll-end-event-in-ionic-to-check-if-user-scrolled-to-bottom-of-the-screen/

Hope that helps.