I've read a lot of suggestions on how to improve performance of an ngRepeat
but I couldn't still understand how to achieve my goal. I have this template:
<ul>
<li ng-repeat="item in items">
{{item.title}}
<ul>
<li ng-repeat="child in item.children">
<a href="{{child.link}}">{{child.name}}</a>
<some other heavy element that takes time to render>
</li>
</ul>
</li>
</ul>
What I would like to accomplish is a quick initial repeat that just shows child.name
and then a separate non-blocking operation (directive, web worker, deferred magic, whatever) that handles the rendering of the heavy elements. In this way the GUI remains snappy and the <a>
element is clickable quite immediately; meanwhile, in background, other stuff gets loaded in the DOM.
It this possible?