ionic下拉刷新上拉加载
问题描述:
ionic下拉刷新上拉加载怎么做,有实例就更好了。求大神们帮忙。
答
http://www.ionic.wang/js_doc-index-id-25.html 这里有比较好的ionic文档,里面有下拉刷新的介绍
pulling-text="下拉刷新..."
on-refresh="doRefresh()">
angular.module('testApp', ['ionic'])
.controller('MyController', function($scope, $http) {
$scope.items = [1,2,3];
$scope.doRefresh = function() {
$http.get('/new-items')
.success(function(newItems) {
$scope.items = newItems;
})
.finally(function() {
// 停止广播ion-refresher
$scope.$broadcast('scroll.refreshComplete');
});
};
});
相信这个对比很有帮助的,请采纳谢谢