2 ms·
You can define a requirejs module that just consists of data: http://requirejs.org/docs/api.html#defsimple http://requirejs.org/docs/api.html#defsimple. Then in
by rgarcia 15y ago
You can define a requirejs module that just consists of data: http://requirejs.org/docs/api.html#defsimple http://requirejs.org/docs/api.html#defsimple. Then in your app incantation (main.js for requirejs stuff), load this module and pass it to your app instance.
If you feel weird about loading data as a js file, there is also a requirejs plugin for loading raw json files as a module: https://github.com/millermedeiros/requirejs-plugins https://github.com/millermedeiros/requirejs-plugins