From 3b79a8a3bf1023f3a68d5308125e024c3aef31f4 Mon Sep 17 00:00:00 2001 From: "Keith D. Moore" Date: Thu, 27 Mar 2014 14:46:09 -0500 Subject: [PATCH] Update ionicContent.js Changed the javascript example for ion-refresher. Moved the call to stop the spinning into a finally block. --- js/ext/angular/src/directive/ionicContent.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/js/ext/angular/src/directive/ionicContent.js b/js/ext/angular/src/directive/ionicContent.js index f65e7a2d470..df75e7115bc 100644 --- a/js/ext/angular/src/directive/ionicContent.js +++ b/js/ext/angular/src/directive/ionicContent.js @@ -186,11 +186,14 @@ function($timeout, $controller, $ionicBind) { * .controller('MyController', function($scope, $http) { * $scope.items = [1,2,3]; * $scope.doRefresh = function() { - * $http.get('/new-items').success(function(newItems) { - * $scope.items = newItems; - * //Stop the ion-refresher from spinning - * $scope.$broadcast('scroll.refreshComplete'); - * }); + * $http.get('/new-items') + * .success(function(newItems) { + * $scope.items = newItems; + * }) + * .finally(function() { + * // Stop the ion-refresher from spinning + * $scope.$broadcast('scroll.refreshComplete'); + * }); * }; * }); * ```