Angular ng-repeat causes flickering

后端 未结 5 929
情话喂你
情话喂你 2021-02-04 02:20

I\'m displaying a list of thumbnails with this code:

5条回答
  •  太阳男子
    2021-02-04 03:00

    You can use track by in your ng-repeat with a unique identifier. If I suppose your channel object has an id, you can do :

    The tracking avoids the complete DOM deletion and recreation at every updates, as Angular will be able to track if the element is the same as previously and will keep the DOM element.

提交回复
热议问题