News for hackers. Stuff that matters.
Re:Backbone patterns by rgarcia on Thursday February 09, 2012 @09:49AM (#3571295)
You can define a requirejs module that just consists of data: 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

There are no comments on this comment yet.