angular.js - Can angular output data ng-repeat output 2500 items? Will there be too many jams?
为情所困
为情所困 2017-05-15 17:05:45
0
4
608

Can angular output data ng-repeat output 2500 items?

为情所困
为情所困

reply all(4)
Ty80

AngularJS currently supports one-way binding to reduce consumption. If it is stuck, you can try adding double colons

ng-repeat="value in ::values "
The value inside

can also be bound one-way, changed to

{{ ::someValue }}

To reduce the number of watches~

我想大声告诉你

No problem, since the CPU of the browser client is used, 2500 cycles is nothing. But under normal circumstances, there are rarely so many. If there is a lot of data, it will be paginated. It does not need to be done in one loop

Ty80

I tried about 4000 items, but the rendering data would be delayed, so I wrote settimeout+push to continuously push array elements into it.
However, I found that there is no need to worry about ng binding monitoring, you should worry about dom scrolling card.

左手右手慢动作

You can refer to bindonce https://github.com/Pasvaz/bin... which can effectively solve the efficiency problems caused by watch

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template