I need to make 3 slides using ion-slides component after adding ion-refresher component to my page the ion-refresher always fired when pulling up at any position in the page (middle,bottom) not only on top of the page.
can someone help my to make ion-refresher only fired on top of the page
this is my code
<ion-content>
<ion-refresher (ionRefresh)="doRefresh($event);">
<ion-refresher-content
pullingText="Pull to refresh"
pullingIcon="arrow-up"
refreshingSpinner="crescent">
</ion-refresher-content>
</ion-refresher>
<ion-slides>
<ion-slide>
<!--put long text-->
</ion-slide>
<ion-slide>
</ion-slide>
<ion-slide>
</ion-slide>
</ion-slides>
</ion-content>
is there a solution for this problem ?
use the enabled tag to enable and disable the ion refresher.
In your HTML, you will need to check the index of the slide using the ionSlideDidChange event as shown below:
In your TS file implement the slideChanged method to check the current index of your slide and enable/disable the pullTorefresh field as shown below and ofcourse to use the getActiveIndex() on the slides, you would need to import the ViewChild component and declare your slides as a ViewChild.