I had /clients/client.js , /server/server.js and /model.js
In model.js I had: "Lists = new Meteor.Collection("lists"); In client/server I had used this collection. All works fine.
After adding coffeescript. I had convert all my js (3) files into .coffee. Remove js files and start meteor. But now I've got:
Uncaught ReferenceError: Lists is not defined
Why? Where is mistake?
Lists = new Meteor.Collection "lists"
Thanks
See http://docs.meteor.com/#coffeescript about how to use @
as a convenient way to define global variables from CoffeeScript inside of the Meteor environment. As @Akshat mentioned in the comments, Meteor sets this
at the top level to the global environment to make this easy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With