Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Require JS and global variables Reply To: Require JS and global variables

#169521
dyr
Participant

Check out the requirejs.config() method (which can be used to pass data “down” to modules in your app):
http://requirejs.org/docs/api.html#config-moduleconfig

Some more discussion:
http://stackoverflow.com/questions/9916073/how-to-load-bootstrapped-models-in-backbone-js-while-using-amd-require-js/10288587#10288587

Cheers