javascript - AngularJS css performance on table column background color -


i have table generate json data ng-repeat. when user click on link want highlight corresponding column in table background color. (when key.key === anchor.output in code)

<table>     <colgroup>         <col ng-repeat="key in preview.data[0] track $index" ng-class="{ 'selected-class-name': key.key === anchor.output }">     </colgroup>     <tr>         <td id="anchoroutput_{{key.key}}" ng-repeat="key in preview.data[0] track $index"> {{ key.key }} </td>     </tr>     <tr ng-repeat="data in preview.data">         <td ng-repeat="key in data"> {{ key.value }} </td>     </tr> </table> 

this code working have huge performance issues on big tables, ie ui profiler tells me there lot of calls removechild() , appendchild()

ui profiler screenshot : http://imgur.com/f5wk02v

questions :

  • what can improve performance of css style update ?

  • i twice same ng-repeat (for <col> , <td>), i'd rid of using ng-repeat-start didn't managed achieve ?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -