Angular ng-repeat causes flickering

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

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

5条回答
  •  长发绾君心
    2021-02-04 03:10

    As a note:

    If using track by $index doesn't update the DOM with the new values,
    consider using a track by 'the properties you expect to change' just be careful to avoid ngDupe errors

    e.g:

    . . .

    $scope.customExp = function(chan) {
        return chan.id+chan.thumbnail_url; // this has to ensure uniqueness
    }
    

    or

提交回复
热议问题