I\'m having a few problems when trying to get data from a Meteor Collection and I need some advice.
The collection has been defined, published, and subscribed successful
if u've removed autopublish, what if u publish the collection to all user without using a publish name?
Meteor.publish null, ->
Products.find {}
where u subscribe your collection ?
template helper
Handlebars.registerHelp = 'products', (id) ->
Product.find _id: Session.get 'productId'
like if we have price in each product. the template part looks like...
{{#each products}}
{{> product-item}}
{{/each}}
{{price}}
the js part, i'll use coffeescript...
Template['product-item'].price = ->
console.log @ # @ is this as it is product itself, if we have product inserted.
console.log this
return 'the price is: ' + @price