【发布时间】:2014-10-06 23:05:24
【问题描述】:
我正在使用 MongoDB 数据库。 对于前面的AngularJS。
另外,我正在使用 Mongoose。
我有:
app.get("/images", function(req, res) {
mongoose.model('Image').find(function (err, images) {
res.send(images);
});
});
app.listen(3000);
当我去:http://localhost:3000/images时它工作正常
然后:
<div ng-repeat="photo in photos">
<!-- My Data List -->
<h3>{{photo.name}}</h3>
</div>
到这里为止,一切都很好。
但是我将有成千上万的数据要显示。
所以我需要像前面的“无限滚动”之类的东西,而且我需要用查询范围或分页来限制 API http://localhost:3000/images ???
我如何才能继续使用大量数据?
谢谢!
【问题讨论】:
标签: node.js angularjs mongoose