Reputation: 11308
I have a situation where I am generating a LOT of rows and columns using Angular and the performance is terrible!!
I'm assuming that it's because my ng-repeat is creating a new scope for each of the elements that it creates, however, this particular function doesn't need to watch anything. I'm simply using ng-repeat as a loop to generate HTML that will never change.
Is there another angular method that I can use to loop through model data and generate HTML without using ng-repeat that will improve performance?
Upvotes: 3
Views: 4965
Reputation: 422
You can create a directive
which will accept the ng-repeat
values and then do whatever you want to do in that directive e.g. create a table which will have those values.
Upvotes: 1