本文介绍了AngularJS对鼠标滚动服务器端分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要寻找一些技巧,这将让我开始做对鼠标的滚动服务器端分页。我有我想要块装入后来动态加载更多滚动鼠标,但在服务器端的大型数据集。我碰到但是这看起来像客户端。有没有可以帮我开始使用这种方法的任何
I am looking for some technique which will get me started to do server side pagination on mouse scroll. I have a large data set which I want to load in chunks and later dynamically load more on mouse scroll but at the server side. I came across ngInfiniteScroll but this looks like client side. Is there any method that can help me get started with this ?
推荐答案
你可以使用无限滚动的以下并修改 loadMore()
方法,以便调用服务器端就这样。
As of infinite scroll you could you use following example and change the loadMore()
method so it calls server side just like this.
$scope.loadMore = function () {
$http.get('/someUrl').
success(function (data, status, headers, config) {
$scope.items.push(data);
}).
error(function (data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
};
这篇关于AngularJS对鼠标滚动服务器端分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!