I'm having an issue with my scrolling div:
<div class="list">
<div class="item" ng-repeat="post in posts">
<img src="post.img" is-visible/>
</div>
</div>
and I've implemented this directive:
angular.element(window).on('DOMContentLoaded load resize scroll', function () {
console.log("window change");
});
The objective is to detect scrolls on the page. However, the problem lies in the fact that only the load
and resize
events are triggering the console comment. When scrolling up and down the list, it fails to trigger. Why could this be happening?