Hi guys,
Let’s assume I have a collection called Books
{ title : “string”,
author : “string”}
Let’s take a look on following code
Template.bookList.helpers({
books: function() {
console.log('meteor');
return Posts.find();
}
});
In this case the 'meteor' will be printed one time. But if i use findOne like this
Template.bookItem.helpers({
book: function() {
console.log('meteor');
return Posts.findOne({'title':'title of the book'});
}
});
The 'meteor' will be printed several times(in some case two in some six).
Why’s that !?