Custom directive value with bindonce in Angularjs
I got a ng-repeat with thousands of item in it, so I decided to tryout bindonce to reduce the number of watches. But I couldn't figure out how to use it properly. So now I got the following code: <div ng-repeat="card in cards"> <div class="item-box" draggable="{{card.category}}" itemId="{{card._id}}"> <img ng-src="{{card.image}}" width="100%" height="100%"> </div> </div> As I read in the bindonce doc , I should add the directive and use the bo-* directives, so I fugured out this: <div ng-repeat="card in cards" bindonce> <div class="item-box" draggable="{{card.category}}" itemId="{{card._id}}">