Reputation:
I started to develop an app using angular-material. I almost finished, but the performance is really bad!
All the animation is lag, and the swipe isn't good. Is there a solution for this problem. Now I see that a lot of people have had such problems.
If not, I will be happy to material design framework that will work with PhoneGap.
Now I use angular, angular material and bootstrap.
Upvotes: 2
Views: 1099
Reputation: 852
You'll want to force hardware acceleration. This is not a built in feature in Angular / Phonegap, but rather a trick you can currently achieve (in most situations) with some CSS3.
The following should suffice for most situations but I would definitely advise some extra research for better performance.
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
Applying the above to various elements in your css(namely animated) should force GPU / Hardware acceleration.
It is also a common practice to avoid use of Jquery or other client facing libraries for heavy DOM manipulation(Usually in regards to animation) and instead make use of the features included in CSS3 instead.
On a quick side note, the module ng-animate
makes pure use of CSS3 for use of it's animations in the later versions of AngularJs
Upvotes: 1