Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70443

ionRefresher completed event?

$
0
0

@bilow wrote:

Hi,

I’d like to know if there is a way or workaround to track a ‘completed’ event for the ionRefresher within the html template only.

Obviously we call the refresherEvent.target.complete() in the ‘controller’ by hand so I can put the ‘extra’ lines there, but I want to handle some simple UI logic just in the html template itself.

What I had in mind:

<ion-refresher (ionRefresh)="refreshing = true; doRefreshStuff($event);" (ionCompleted)='refreshing = false;' slot="fixed" >
  <ion-refresher-content></ion-refresher-content>
</ion-refresher>

<ion-skeleton-text animated *ngIf='refreshing'></ion-skeleton-text>

So the idea is to control the 'refreshing' value only from within the template and (in this case) to show/hide the ion-skeleton-text component.

Looking forward to hear some ideas about this…
P.s. example is Ionic ‘4’ but this applies to all versions

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70443

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>