Reputation: 1635
I'm really not sure what the issue is here. Maybe I don't understand the publish/subscribe docs enough.
In my server directory:
Meteor.publish("kudos", function () {
return Kudos.find({});
});
In my client directory:
Meteor.startup(function(){
Meteor.subscribe("kudos");
});
Template.launchsection.kudos = function () {
return Kudos.find({});
};
When I run this, I get an error of Kudos is not defined
for the line that returns Kudos.find({});
.
What am I missing?
Upvotes: 1
Views: 210
Reputation: 91
Specifically, you need to write Kudos = new Meteor.Collection("kudos")
in both your client and server directory.
Upvotes: 4