Swipe right to get other tab Swipe left to get previus tab

Hi , I’m using the basic tabs app from the Getting started section. I found an example about my problem in swiping tabs , but the swipe right is not working ,can you help me ? Thanks .

Sorry, but have you carefully check this example?

Swipe left works just fine but it’s used only on one tab, you need to add it to all of them.

@Gajotres I’m sorry my mistake , the swipe right I was Talking about is not functioning. :sweat_smile:

It will work if you add it like this: http://codepen.io/Gajotres/pen/qdQgWo

on-swipe-right="goTo('tabs.home')"

In this example, you can switch between tabs Home and About.

Or if you want to save history order use on-swipe-right to call

history.back()

Though I would like to advise you to move function goTo to some service or factory, no point in having multiple iterations of the same function among different views.

how about if I’m in “About Tab” , How can move to “Contact Tab” by swiping left again ?

Wow, I figure it out , Now I Understand ,
I put inside the ion-view the on-swipe-left="goTo(‘tabs.contact’)"
Thanks for the help @Gajotres :smile:

And you only had to ask :smile:

Thanks you so much :grin:

How about putting some animation when I Swipe ? Just like the slidebox when I swipe the page ? Is that possible in ionic ?

Something like this: http://codepen.io/Gajotres/pen/bdQZbq

yes, but why, is there a black animation when I swipe it ? Can I remove that black animation when I Swipe ?

You will need to google it a bit, I currently to busy to check that out.

Ok , by the way thanks for the time and help :grinning:

1 Like

You’re welcome m8 :smile:

1 Like

In case someone else is looking for animated tabs or swipable tabs, i just created a directive for that matter.
just give it a try, GitHub repository.