Wednesday 15 May 2013

node.js - Mongoose, AngularJS, NodeJS -



node.js - Mongoose, AngularJS, NodeJS -

i using mongodb database. front end angularjs.

also, using mongoose.

i have:

app.get("/images", function(req, res) { mongoose.model('image').find(function (err, images) { res.send(images); }); }); app.listen(3000);

it works fine when go to: http://localhost:3000/images

then:

<div ng-repeat="photo in photos"> <!-- info list --> <h3>{{photo.name}}</h3> </div>

until here, fine.

but have one thousand , one thousand info display. need "infinite scroll" front end , need limit api http://localhost:3000/images query range or pagination ???

how can proceed lots of data?

thanks!

use server side pagination in mongoose using mongoose-paginate , limit query output. same way include pagination in angular utilize angular-ui pagination. if want utilize infinite scroll in angular utilize nginfinitescroll.

hope helps.

node.js angularjs mongoose

No comments:

Post a Comment