Skip to content

Instantly share code, notes, and snippets.

@renegare
Created August 10, 2012 15:46
Show Gist options
  • Save renegare/3315139 to your computer and use it in GitHub Desktop.
Save renegare/3315139 to your computer and use it in GitHub Desktop.
wire.js pass a reference of the context to a component
define(function(){
var spec = {
some_resource: [],
app: {
module: 'module_a',
ready: {
init: [{ $ref: 'views_controllers'}]
}
},
another_model: {
// ...
}
};
// here is where I pass in the reference to the context
spec.app.ready.init.push(spec);
return spec;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment