Reputation: 22286
Within my $scope I have a very large, read-only data structure (maybe 3000+ objects in a hierarchy). Since this never changes, and because I want to maximise performance on mobile, I want to tell Angular it can skip looking for changes within this structure within its digest cycle.
Any ideas if/how this can be done?
Upvotes: 0
Views: 604
Reputation: 67296
Yes, check out the bindonce
project here. It allows you to bind in a field without creating a watch.
So, as you describe there won't be any two-way binding, and therefore, no dirty-check in the $digest cycle.
Upvotes: 1