Hi. I have a list with an item. When I click on this item, I reload the list with two new items. but the previous item remains on the screen for a while along with new items and then disappears.
OK I understand. Thank you anyway.
I do not even know what part of the code show you.
I will try to make an example to post here.
It sounds like you are first adding new items to the list and then removing the old one, if that’s the case, why not just substitute the showing array with the second one?
I’m doing it. When the array returns from the service, I do some processing on it, but first I make:
// at this point, items has the old items
$scope.items = ;
// myService defers a promise
$scope.items = data; // this is the new items
// items is the array that I use in the ng-repeat
So I expected the previous items have been removed.
I walked around the problem by creating a new list and hiding the previous one.
thx for your attention