Features

When to use RequireJS?

define(['dep1','dep2'] , function ($) {
    //Return the public API for your module.
    var api = {
    	function () {
    	//API behavior here
		};
	};
	return api;
});

require(['dep1'], function(dep1) {
	//Use the defined public api here
	};
);
Snippet 1: Require JS API & Loading