I have a performance problem with angular in the following scenario:
<div ng-repeat="a in array">
<input ng-model="something">
</div>
I wrote code in my controller that on ng-click
changes the array to have a different set of objects. The problem is that if the array has a decent amount of objects, the click is not as responsive as I would like it to be (short delay).
After some investigation, I noticed that the $digest
takes a pretty long time after I change the array in my ng-click
. So I created this short test code to reproduce it.
The real app scenario is this: I have a table in which every row represents an editable object and each object has many different fields I want to be able to edit. This way, whenever I click on a row in the table, there is another html that has all those ng-repeat
s with different input
s on the properties of my object.
Does anyone have an idea on how to make this more efficient?
Thanks