I have a directive which should detect a scroll-event on every parent element. The scrollable element could be div with overflow:scroll
or the browser-window itself. So this solution does not work in all cases:
angular.element($window).bind("scroll", function() { ... });
Okay, I found the solution. Here it is:
angular.element(document.querySelectorAll('*')).bind("scroll", $scope.myFunction);