I am developing android app using ionicframework.It use a <ion-refresher>
to load the contents dynamically when pull down the page,but it didnt work.
<ion-refresher
pulling-text="Pull to refresh..."
on-refresh="doRefresh">
</ion-refresher>
controller
$scope.doRefresh = function() {
$http.get('http://localhost/test/gksfapp_backend.php?action=an').then(function(msg){
//never executed.
$scope.items=msg.data;
})
.finally(function() {
// Stop the ion-refresher from spinning
$scope.$broadcast('scroll.refreshComplete');
});
I believe you have simply forgotten the parenthesis after doRefresh
<ion-refresher
pulling-text="Pull to refresh..."
on-refresh="doRefresh()">
</ion-refresher>
Also, here is a working code example. http://codepen.io/ionic/pen/mqolp