Animation on swipe left and right


#1

Hi,
I am showing a text(stored in one array of texts) on a view and with the gesture swipe left and right i would like to give the impression to change page.
I have handled the swige gesture and it works good but i don’t know if there is some “ionic” way to make the animation! :smile:

I made a ionic playground example: http://play.ionic.io/app/888cd83eab9b

Ionic playground rocks!


#2

Hey man,

In your case you should probably use http://ionicframework.com/docs/nightly/api/directive/ionSlideBox/ in place of making your owh swipe functionnality. It will look better, feel better… And have the transition you need out of the box.


#3

Thanks, i will give it a look, but i have developed some logic and i do more stuff on my function on swipe left and swipe right, maybe i have to go and deal with transition css :slight_smile:


#4

Nah, won’t look good ! If you need to act anytime the user moves left or right, just use the “on-slide-changed” directive. Also, take out the direction=“x” from your ion-content in order to implement it well.