mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Update ionicContent.js
Changed the javascript example for ion-refresher. Moved the call to stop the spinning into a finally block.
This commit is contained in:
13
js/ext/angular/src/directive/ionicContent.js
vendored
13
js/ext/angular/src/directive/ionicContent.js
vendored
@@ -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');
|
||||
* });
|
||||
* };
|
||||
* });
|
||||
* ```
|
||||
|
||||
Reference in New Issue
Block a user