Sign in
Log inSign up
Angular ng-repeat render delay

Angular ng-repeat render delay

Matan Yedayev's photo
Matan Yedayev
·Feb 27, 2016

I have $scope.items = [item1, item2, etc...] and ng-repeat="item in items" in html.

When I change $scope.items = [anotherItem1, anotherItem2, etc...], there is a delay in rendering.

The result is that I see the first array, than I see the 2 arrays combined (for 300ms), then it renders and shows only the second array.

Video to understand the problem perfectly (contains preview and code): https://drive.google.com/file/d/0B_2AM8ZhXhE9a2VjRmlycWJOaUE/view

EDIT: The ng-class is delaying too the render...