In this lesson we will improve the performance of our Angular web application by optimizing the *ngFor.
*ngFor can update the dom element on change, or recreate the dom element on change, a common mistake is to let angular create a new dom element for *ngFor list while in fact in should update the dom element.
We will also explain how you can enforce trackBy in your code by activating a lint rule for trackBy functions
The full source code for this lesson as well as a step by step guide, is available here: https://www.academeez.com/courses/ang...
#angular
00:00 How does ngFor work during update
01:15 New angular application with ngFor
03:06 Update and Recreate DOM Element in ngFor
05:37 How *ngFor decides to recreate or update dom element
07:47 Common mistake with *ngFor
09:06 example of common mistake with *ngFor
10:34 Optimize *ngFor
13:50 trackBy lint rule
15:50 Summary
Watch video Optimize Angular: accelerate *ngFor with trackBy online without registration, duration online in high quality. This video was added by user academeez 28 November 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 257 once and liked it 15 people.