How to use query animation in ionic v1


#1

I want to use animation in my app. Is there any equivalent of this jquery animation in angularjs.

$(".bf"+i).animate({top:posY, left:posX},1000+1000*Math.random()).

or if this is not available in angularjs then how can i use jquery animation in ionic v1?


#2

Angular uses CSS3 Transitions and nganimate module to enable animations.

You can still use jquery animations in ionicv1 by just referring to respective jquery source files


#3

@thesourav is it possible to use nganimate from controller.js. And for jquery what is the way to include the reference of jquery file in controller.js


#4

You can include jquery in your index.html. Make sure you declare it before angular/ionic bundle js.

Alternatively, nganimate is already included in ionic bundle js. For more info, you can follow the steps as described here