I am currently utilizing AngularJS with the ng-repeat
directive. Each item within the repeat structure is quite large, containing numerous instances of ng-bind
, and the entire list is enclosed within a scrollbar. I am looking to develop a script that can deactivate the watches associated with each ng-bind
when the item is not visible (outside the scrollable area) and reactivate them once the item becomes visible again.
I have two inquiries:
1. Has anyone already created such a script?
2. Since ng-bind sets up a watch, how can I access the watch deactivation process ($scope.$watch
only provides the deactivation method, which occurs within the ng-bind directive)?
Thank you!