Swipe Page in Ionic3


For my app, I have 3 pages : page1, page2 and page3. My main page is Page2.
So, I want to swipe on the left to go on page1 and on the right to go on the page3.
I tried with tabs and this function :

swipePage(event) {
if(event.direction === 2) {

(I have an error with page2.html : swipePage() is not a function)
I put the function here on my html :

<div class=“main-content” (swipe)=“swipePage($event)”>


Can you help me ?
Thank you !