Skip to content

Commit

Permalink
Merge pull request #4222 from beauby/refresher-promise
Browse files Browse the repository at this point in the history
Make ionRefresher promise-friendly
  • Loading branch information
mlynch committed Dec 6, 2015
2 parents 5eeb668 + be2a6b8 commit d1f31a4
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 @@ -293,7 +293,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 d1f31a4

Please sign in to comment.