jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
352 stars 94 forks source link

$data.generatedContext #250

Open a2dude opened 8 years ago

a2dude commented 8 years ago

Using jaysvcutil with -m I get the following:

(function(mod) {
    stuff removed...

    mod($data.generatedContext || ($data.generatedContext = {}), $data); // Plain browser env
})(function(exports, $data) {

As $data is a singleton in the global context (correct?) how can I support multiple, ie distinct, models? Should model 1 set type and factory to $data.generatedContext.model1[ type / factory ] to distinguish these from model 2?