@gokujy wrote:
I am using ionic slides and i want exit app if active slide is zero else active slide is more then zero to go to on zero any idea what to do…please help.
constructor(platform: Platform, public navCtrl: NavController, public navParams: NavParams, private superTabsCtrl: SuperTabsController, private popoverCtrl: PopoverController, public storage: Storage) { this.rootNavCtrl = this.navParams.get('rootNavCtrl'); platform.ready().then(() => { platform.registerBackButtonAction(() => { if (this.currentIndex == 0){ platform.exitApp(); //}else if(this.currentIndex > 1 && this.currentIndex > 13) { // this.currentIndex = this.slides.getActiveIndex() - 1; }else{ this.slides.slideTo(0, 500); } }); }); }
Posts: 1
Participants: 1