0

I am developing an tabbed application I have three tabs

<ion-tabs #tabsPage swipeBackEnabled="true">
  <ion-tab [root]="tab1Root" tabTitle="{{'tabs.tab1'|translate}}&zwnj;" tabIcon="ios-home-outline"></ion-tab>
  <ion-tab [root]="tab2Root" [rootParams]='filter' tabTitle="{{'tabs.tab2'|translate}}&zwnj;" tabIcon="ios-list-box-outline"></ion-tab>
  <ion-tab [root]="tab3Root" tabTitle="{{'tabs.tab3'|translate}}&zwnj;" tabIcon="md-walk"></ion-tab>
</ion-tabs>

Tab 2 is a list view on click each item will push detail page. I was not able to use swipe back in IOS.

When I tried to debug the properties with the below snippet

alert(this.navCtrl.canGoBack());
alert(this.navCtrl.canSwipeBack());
alert(this.navCtrl.swipeBackEnabled);

I get true, undefined, true

If I set swipeBackEnabled to false I get true, false, false

Help me here I have tried all combination to enable swipeBackEnabled.

I tried swipeBackEnabled in 1.module.ts 2.app.html

<ion-nav #samNav [root]="rootPage" swipeBackEnabled="true"></ion-nav>

3.tabs.html example above

Nothing worked.

Swapnil Patwa
  • 4,069
  • 3
  • 25
  • 37
Gogul
  • 298
  • 2
  • 14

2 Answers2

0

I have solved this issue by updating "devDependencies": { "@ionic/app-scripts": "2.1.4", "ionic": "3.9.2", "typescript": "2.3.4" },

Gogul
  • 298
  • 2
  • 14
0

Where did you place the swipeBackEnabled="true"? I tried it in app.html and the tabs.html but I my output of console.log(this.navCtrl.canGoBack(), this.navCtrl.canSwipeBack(), this.navCtrl.swipeBackEnabled); is still true undefined true. My devDependencies are like yours.

"devDependencies": {
"@ionic/app-scripts": "^2.1.4",
"ionic": "^3.9.2",
"typescript": "2.3.4"}
BackesM
  • 13
  • 4