Skip to content

Commit

Permalink
Make ionRefresher promise-friendly.
Browse files Browse the repository at this point in the history
  • Loading branch information
beauby committed Aug 12, 2015
1 parent 2f30786 commit be2a6b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/angular/controller/refresherController.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,13 @@ IonicModule
function start() {
// startCallback
$element[0].classList.add('refreshing');
$scope.$onRefresh();
var q = $scope.$onRefresh();

if (q && q.then) {
q.finally(function() {
$scope.$broadcast('scroll.refreshComplete');
});
}
}

function show() {
Expand Down

0 comments on commit be2a6b8

Please sign in to comment.