javascript - Performance issue in ngRepeat -
i have ngrepeat
block iterates on array of objects draws row accordingly.
one of properties of object string requires transformation before displayed.
performancewise, right run function everytime angular runs loop?
<div ng-repeat="a in arr">{{ strtransform(a.name) }}</div>
yes, ok, performance-wise , everything, unless:
- your transformation function way expensive, in case you're doomed, or:
- you got humongous amount of elements process, in case you're doomed rendering time anyway.
--
as side note, i'd add might wanna use angular filter (link) these kinds of operations :)
Comments
Post a Comment