ionic 下拉重新整理
阿新 • • 發佈:2019-01-05
HTML
<ion-contentclass="list-panel" delegate-handle="indexScroll"> <div class="content has-header"> <ion-refresher pulling-text="下拉重新整理" on-refresh="doRefresh()"></ion-refresher> <ion-list class="list"> <ion-item class="item" ng-repeat="data in data" ng-bind="data"></ion-item> </ion-list> </div> </ion-content>
js
$scope.data = [ "張三", "李四", "王二小", "李大牛", "薛寶釵", "林黛玉", "李靖", "歐陽震華", "花千骨", "白子畫", "李白" ];
$scope.doRefresh = function() {
$scope.data = [
"張三1111", "李四1111", "王二小11", "李大牛11", "薛寶釵11", "林黛玉11", "李靖1111", "歐陽震華", "花千骨11", "白子畫11", "李白1111" ]; $scope.$broadcast('scroll.refreshComplete'); };