IE11 slow / freeze with AngularJS's ng-repeat rendering

前端 未结 2 706
我在风中等你
我在风中等你 2020-12-10 04:40

Currently I have a very sublte problem to solve with IE11 and AngularJS.

My page consists of two nested ng-repeat to create a tabset with a table inside any tab.

2条回答
  •  [愿得一人]
    2020-12-10 05:16

    AngularJs has limits for rendering bindings per page (In some articles you can find that it is around 2000 bindings). Currently you've just faced this situation. The reason why chrome and Mozilla work smoothly is that DOM operations for them are optimized better. In order to improve your performance try to:

    • avoid using sort in ng-repeat (sort it before insertions)
    • Use one-time bindings (:: syntax)
    • Remove unnecessary watches
    • Optimize digest cycles
    • Use pagination
    • Replace angularjs ng-repeat with ReactJs components (in case of really big amount of data)

提交回复
热议问题