简体   繁体   English

通过弹性用户界面使用角度搜索和弹性搜索实现无限滚动

[英]Implementing infinite scroll with angular and elasticsearch via elastic ui

Being both an AngularJS and Elasticsearch newbie, I'm currently working on a project where I should implement infinite scrolling on a frontend managed by ElasticUI (AngularJS Directives for Elasticsearch). 作为AngularJS和Elasticsearch的新手,我目前正在一个项目中,我应该在由ElasticUI管理的前端(用于Elasticsearch的AngularJS指令)上实现无限滚动。

ElasticUI provides a pagination object (euiSimplePaging) that allows to load results on separate pages, but I'd like to load the new results on scroll and add them to the current ones. ElasticUI提供了一个分页对象(euiSimplePaging),该对象可以将结果加载到单独的页面上,但是我想滚动加载新结果并将其添加到当前页面。

I quickly set up ngInfiniteScroll, which works, but I don't know where to start to link both apps. 我迅速设置了ngInfiniteScroll,它可以工作,但是我不知道从哪里开始链接这两个应用程序。 In a future step, I would even be able to listen to the results before showing them, as they should be displayed in a masonry-like grid. 在以后的步骤中,我甚至可以在显示结果之前先听取结果,因为结果应该显示在类似砖石的网格中。

If anybody had a clue on how to get started… 如果有人对如何入门有所了解...

I have no experience with ngInfiniteScroll, but I would try the following: 我没有ngInfiniteScroll的经验,但可以尝试以下方法:

infinite-scroll="indexVM.pageSize+=10"

to increase the pageSize of elasticui whenever ngInfiniteScroll requests more items 每当ngInfiniteScroll请求更多项目时,增加elasticui的pageSize

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM