我正在使用Refresher组件和Ionic 3
app.It工作正常。但是现在我有一个要求只有当用户举起手指才应该刷新,如果没有,然后刷新操作被取消。你知道如何实现这样的功能吗?
html的
<ion-refresher (ionRefresh)="getData($event)">
<ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh"
refreshingSpinner="circles" refreshingText="Refreshing...">
</ion-refresher-content>
</ion-refresher>
.TS
getData(refresher?: any) {
Observable.forkJoin([myTopicApi, myarticlApi, myPicksAPi])
.subscribe(res => {
if (refresher) { refresher.complete(); }//terminate refresher
},
error => {
if (refresher) { refresher.complete(); }
},
() => { if (refresher) { refresher.complete(); } }
)
}