Hi everybody,
I have a question about the ion-refresher component.
In an interface, i need to have a pull-to-refresh and a separate button that can also trigger the refresh.
My button ng-click and and the ion-refresh on-refresh both call the same function, which set a $scope variable ‘refreshing’ to true, then grab data, and turn the ‘refreshing’ variable to false again.
When the refresh function is called by ng-click, the variable ‘refreshing’ is modified, however, it’s not modified when called from the ion-refresher element, here is a codepen that show the issue:
See the Pen Pull To Refresh and Refresh button by Pierre VIGIER (@pierre-vigier) on CodePen.
It gives me the impression that when called from the on-refresh command of the ion-refresher, the function have no access to the $scope, does anyone have an idea for that?
Thanks,
Pierre