Created
August 10, 2012 15:46
-
-
Save renegare/3315139 to your computer and use it in GitHub Desktop.
wire.js pass a reference of the context to a component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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