Skip to content Skip to sidebar Skip to footer

Avoid Unnecessary Evaluation Of Bound Values In Angular.js

Have an angular.js directive that renders as a table. Most of the time, the table is small, so performance is not an issue. But sometimes, the table has many rows (e.g. thousand

Solution 1:

If you're using Angular 1.3 and the data in your table is not updated in other moment you must try bind once.

<trng-repeat="key in ::rowKeys"><td>{{::key}}</td></tr>

Also ng-mouseenter and ng-mouseleave generate more $watchers, I recommend you use CSS rules to make this effect in your menu.

Post a Comment for "Avoid Unnecessary Evaluation Of Bound Values In Angular.js"