dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Jan 1, 2019

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Optimize ng-repeat with the Track by Feature in Angular

Take a look at the following ng-repeat code example:

<div ng-repeat="order in orders">
</div>

This is inefficient, as the DOM is rendered every time the list is written to the page. Add the track by feature, as shown below, by allowing the code to specify the id key instead of creating random ones and slowing the process.

<div ng-repeat="order in orders track by order.orderid ">
</div>
Srinath MS
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Thanks for your registration, follow us on our social networks to keep up-to-date