I have a database table called Questions.
My goal is to display the first question and then upon user interaction, show them the next one.
To retrieve the first question, I use the following query:
Template.home.user_questions = function () {
return Questions.find({}, {sort: {answer1:{'$ne': ''}}, limit: 1});
}
Handling the user's click event is done as follows:
'click input' : function () {
Questions.update(this._id, {$inc: {value1: 1}})
// now display the next question
}
However, I am struggling with showing the next question as Meteor does not support hasNext() and next() methods.