Avinash Raj
Avinash Raj

Reputation: 174874

Ionic ion-refresher not working on my app

I have to reload the page on refresh. Below code works for me in browser but on app, it crashes on refresh.

<ion-refresher
          pulling-text="Pull to refresh..."
          on-refresh="doRefresh()">
  </ion-refresher>

On my controller,

$scope.doRefresh = function() {
        $window.location.reload(true);
        $scope.$broadcast('scroll.refreshComplete');
};

Upvotes: 0

Views: 453

Answers (1)

AnatolyS
AnatolyS

Reputation: 4319

In the refresh method there is no need to go or reload the page, you only need to refresh @scope's data binded to html page.

Upvotes: 1

Related Questions