I have a simple array of numbers shown below using ng-repeat
:
n = [1,2,3,4,5,6]
The problem arises when I modify this array, for example:
n=[1,2,3]
Instead of fully reloading the DOM, only the last 3 div
elements corresponding to array 4, 5, 6
are removed. Is there a method to ensure that ng-repeat
reloads the DOM every time the array is changed.