Sometimes it is required to access a module from a script, RequireJS provides such capability by using the
require
function to execute a function in the managed context:
require(["SHARED/ModuleA"], function(a) {
// Codes of interacting with module A
a.doSomething();
});In such a situation, you need to use the AMD module name of the module on which you need to depend,
this case uses PORTLET/ModuleA.
The prefix in uppercase is the module scope among SHARED, PORTLET and PORTAL.