Last active
August 29, 2015 14:09
-
-
Save rajanand02/b8451b71c51e3618a216 to your computer and use it in GitHub Desktop.
Mongo skip and limit in meteor subscription
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Meteor.publish("posts",(skip,limit)-> | |
return Posts.find({post_id:this.userId},{sort:{date:-1},limit:limit,skip:skip}) | |
) | |
Meteor.subscribe("posts",10,568) | |
# use session variables to keep track of limit and skip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment