I am new to meteor. I just created a Hello world project using meteor. My project structure is very simple at the moment.
- root folder
- abc.css
- abc.html
- abc.js
In abc.js I just tried declaring a variable like this:
var lists = new Meteor.Collection("Lists");
if (Meteor.isClient) {
Template.hello.greeting = function () {
return "My List.";
};
Template.hello.events({
'click input' : function () {
if (typeof console !== 'undefined')
console.log("You pressed the button");
}
});
}
if (Meteor.isServer) {
Meteor.startup(function () {
});
}
But when i run this, I am getting the following error in browser console:
[18:17:32.895] ReferenceError: lists is not defined
I am not sure what am I doing wrong.