Core Description
Function require
fcf.Actions->[...modules] require([string] a_modules, function a_cb = undefined)
[Asynchronous method] Loads JS modules declared via the fcf.module() method
Source file
fcf:fcf.js
Namespace
fcf
Arguments:
[string] a_modules - Array of loadable modules
function a_cb - Callback that contains the loaded modules data as parameters
Return value:
fcf.Actions->[...modules]
Returns an array of requested modules in a fcf.Actions object
Examples
Example 1
let [application, cache] = await fcf.require(["fcf:NServer/Application.js", "fcf:NSystem/cache.js"]);
Example 2
fcf.require(["fcf:NServer/Application.js", "fcf:NSystem/cache.js"])
.then((application, cache)=>{
...
})
Example 3
fcf.require(
["fcf:NServer/Application.js", "fcf:NSystem/cache.js"],
(application, cache)=>{
...
}
);