Is it possible to implement, Swipe feature to the <ion-tabs> itself, instead of <super-tabs>


#1

I want to implement swipe feature to <ion-tabs>, but not using <super-tabs>. Do anyone know to implement swipe feature to <ion-tabs>. Below is the sample project link, if you need…

https://drive.google.com/file/d/1NpBmi2VpSW46Em4sH_f0ItcSCnlca3fG

1.Open the project in VS Code and run npm install in integrated terminal window.
2.Run ionic serve
3.Click on Recharge/Payments
4.Select the options in Operator and State selectbox.
5.Click on ViewPlans


#2

The easiest way, the way Ionic choosed : https://github.com/ionic-team/ionic/tree/v3/src/gestures
Is to import HammerJs, and create your own utils functions.
Then you’ll be able to do a component that do a specific thing on tap, double tap, swipe etc…

npm i hammerjs@latest --save
npm install --save-dev @types/hammerjs
add HammerJs to the tsconfig.json file:

{
  "compilerOptions": {
    "types": [
      "hammerjs"
    ]
  }
}

now you are able to:
import * as 'hammer' from 'hammerjs';


#3

I didn’t understand…Can you please explain with implementation(How to use hammerjs in my case for swiping…)


#4

https://hammerjs.github.io/getting-started/
Read the DOCS!


#5

Read the docs. Tried, but no fruitful result…


#6

you can try this tutorial


#7

Above is using Super-tabs. But I need to implement using ion-tabs itself. Is it possible?..


#8

check this.Switching Tabs with swipe gestures - Ionic2 - Typescript

i haven’t tried this.i used the swipeable tabs