|
61 | 61 | * @ngdoc demo
|
62 | 62 | * @name ionRefresher#withAList
|
63 | 63 | * @module refresherList
|
64 |
| - * @javascript |
| 64 | + * @javascript |
65 | 65 | * angular.module('refresherList', ['ionic'])
|
66 | 66 | * .controller('RefresherCtrl', function($scope, $timeout) {
|
67 | 67 | * $scope.items = ['Item 1', 'Item 2', 'Item 3'];
|
|
81 | 81 | * <ion-header-bar class="bar-positive">
|
82 | 82 | * <h1 class="title">Refresher</h1>
|
83 | 83 | * </ion-header-bar>
|
84 |
| - * |
| 84 | + * |
85 | 85 | * <ion-content ng-controller="RefresherCtrl">
|
86 |
| - * |
87 |
| - * <ion-refresher on-refresh="doRefresh()" |
88 |
| - * pulling-text="Pull to refresh..." |
89 |
| - * refreshing-text="Refreshing!" |
| 86 | + * |
| 87 | + * <ion-refresher on-refresh="doRefresh()" |
| 88 | + * pulling-text="Pull to refresh..." |
| 89 | + * refreshing-text="Refreshing!" |
90 | 90 | * refreshing-icon="ion-loading-c">
|
91 | 91 | * </ion-refresher>
|
92 |
| - * |
| 92 | + * |
93 | 93 | * <ion-list>
|
94 | 94 | * <ion-item ng-repeat="item in items">{{item}}</ion-item>
|
95 | 95 | * </ion-list>
|
96 |
| - * |
| 96 | + * |
97 | 97 | * </ion-content>
|
98 | 98 | */
|
99 | 99 | IonicModule
|
@@ -133,8 +133,10 @@ IonicModule
|
133 | 133 |
|
134 | 134 | scrollCtrl._setRefresher($scope, $element[0]);
|
135 | 135 | $scope.$on('scroll.refreshComplete', function() {
|
136 |
| - $element[0].classList.remove('active'); |
137 |
| - scrollCtrl.scrollView.finishPullToRefresh(); |
| 136 | + $scope.$evalAsync(function() { |
| 137 | + $element[0].classList.remove('active'); |
| 138 | + scrollCtrl.scrollView.finishPullToRefresh(); |
| 139 | + }); |
138 | 140 | });
|
139 | 141 | };
|
140 | 142 | }
|
|
0 commit comments