Friday, November 11, 2016

angularjs - ng-repeat execution forces input to lose focus - Stack Overflow

angularjs - ng-repeat execution forces input to lose focus - Stack Overflow


14
down vote
accepted
Yes (looking at the symptoms, you did not show us the data) your issue could be because your model is the text in the array that you (may have), so whenever you update the model, it will trigger digest cycle since ng-repeat is tracked by the text. You can easily fix this by providing. track by $index, so that the ng-repeat is watched over and repeat watch gets updated only when the array changes in its length.




No comments: