Optimize Angular: accelerate *ngFor with trackBy

Опубликовано: 28 Ноябрь 2023
на канале: academeez
257
15

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


Смотрите видео Optimize Angular: accelerate *ngFor with trackBy онлайн без регистрации, длительностью online в хорошем качестве. Это видео добавил пользователь academeez 28 Ноябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 257 раз и оно понравилось 15 людям.