Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit be2a6b8

Browse files
committedAug 12, 2015
Make ionRefresher promise-friendly.
1 parent 2f30786 commit be2a6b8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎js/angular/controller/refresherController.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,13 @@ IonicModule
287287
function start() {
288288
// startCallback
289289
$element[0].classList.add('refreshing');
290-
$scope.$onRefresh();
290+
var q = $scope.$onRefresh();
291+
292+
if (q && q.then) {
293+
q.finally(function() {
294+
$scope.$broadcast('scroll.refreshComplete');
295+
});
296+
}
291297
}
292298

293299
function show() {

0 commit comments

Comments
 (0)
Please sign in to comment.