diff --git a/js/angular/directive/refresher.js b/js/angular/directive/refresher.js index 99f0792adb..9f763a9371 100644 --- a/js/angular/directive/refresher.js +++ b/js/angular/directive/refresher.js @@ -57,6 +57,45 @@ * the refresher. * */ +/** + * @ngdoc demo + * @name ionRefresher#withAList + * @module refresherList + * @javascript + * angular.module('refresherList', ['ionic']) + * .controller('RefresherCtrl', function($scope, $timeout) { + * $scope.items = ['Item 1', 'Item 2', 'Item 3']; + * + * $scope.doRefresh = function() { + * $timeout(function() { + * $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); + * $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); + * $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); + * $scope.items.push('New Item ' + Math.floor(Math.random() * 1000) + 4); + * $scope.$broadcast('scroll.refreshComplete'); + * }, 1000); + * }; + * }); + * + * @html + * + *

Refresher

+ *
+ * + * + * + * + * + * + * + * {{item}} + * + * + * + */ IonicModule .directive('ionRefresher', ['$ionicBind', function($ionicBind) { return {