javascript - Data rendering is making animation lag -
we use angular.js our application , need add animation. create directive that.
but main problem if start animation @ same time angular update model , render in view, animation start lagging. problem occur when have big list (around 150) created ng-repeat.
i've tried use jquery animation , tweenmax doesn't change thing. need fix because 1 of our biggest problem right performance of our application animation.
anyone have idea how prevent that?
i'm not doing in code:
**in crontroller** $scope.$on('$routechangesuccess', function( obj, current, previous ){ acidata.getsequence( $scope.sequenceslug ).then(function(data) { $rootscope.sequence = data.data; }); } **in directive** scope.$on('$routechangesuccess', function( obj, current, previous ){ if(angular.isdefined(current.params.sequence) && current.params.sequence != 'dashboard'){ elm.animate({ 'left' : '0' }); } else { elm.animate({ 'left' : -elm.outerwidth() }); } })
i may not able use latest build of angular animation since it's still unstable.
Comments
Post a Comment