Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular2 animation is slow on long lists

I'm using angular animation on a list component, a slide-in-out animation. It works fine when the list is short, but when I have more then 50 items on the list, the animation is laggy. What is the cause of that? how can it be solved?

like image 417
sangress Avatar asked Oct 30 '25 01:10

sangress


1 Answers

I found the source to the performance issue.
Added changeDetection: ChangeDetectionStrategy.OnPush to the root component, now everything is fast as it used to be, I hope that new issues won't be rising now :)

like image 62
sangress Avatar answered Oct 31 '25 16:10

sangress



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!