We can solve this problem by Adding delay to window scroll event. If user is not scrolling for last one second, then We can confirm that the user stopped scrolling.

Script 

In this below script window was bonded to scroll event
Scroll event will be triggered after 1 second ( 1000 milli seconds)
function myCtrl($scope, $window, $timeout) {
   $scope._timeout  = null;
   angular.element($window).bind(
    "scroll", function() {
         if($scope._timeout){ //if there is already a timeout in process cancel it
          $timeout.cancel($scope._timeout);
         }
         $scope._timeout = $timeout(function(){
           $scope._timeout = null;
           alert('scroll stopped');
         },1000);
   });  
}

0 comments:

Blogroll

Follow this blog by Email

Popular Posts