Hi guys, quick question: is there a way to reference a global variable from within a module? Say I declare foo = true in app.coffee, I don't appear to be able to use window.foo from modules/Bar.coffee for example. Any ideas?
It's not possible through a module referencing an app.coffee variable. You can however store the variable in the module and reference it in both the app.coffee and module. So in the module write: "exports.moo = true", and then you can manipulate that in the app.coffee with "module.moo." Hopefully, that helps!