Skip to content

Instantly share code, notes, and snippets.

@kamleshchandnani
Last active December 2, 2017 14:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
// File log.js
define(['logModule'], function(){
// export (expose) foo for other modules
return {
log: function(){
console.log('Example of AMD module system');
}
};
});
// File index.js
require(['log'], function (logModule) {
logModule.log();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment