Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
dependency injection
// require two modules
require(["requiredModuleOne", "requiredModuleTwo"],
// run this callback when modules are loaded
function(moduleOne, moduletwo) {
// explicitly declare a dependency is available
provide(newModuleName, resultWhenRequired);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment