Loads a js file, by wrapping 'require' into a Promise.
class names to load.
Optional
the loading options.
A promise resolving the js file(s).
import loadJS from "apprt-core/load-js";loadJS("esri/Map").then(function(Map){ return new Map();}); Copy
import loadJS from "apprt-core/load-js";loadJS("esri/Map").then(function(Map){ return new Map();});
import loadJS from "apprt-core/load-js";loadJS(["test/Class1","test/Class2"]).then(function(clazzes){ const Class1 = clazzes[0]; const Class2 = clazzes[1]; // ...}); Copy
import loadJS from "apprt-core/load-js";loadJS(["test/Class1","test/Class2"]).then(function(clazzes){ const Class1 = clazzes[0]; const Class2 = clazzes[1]; // ...});
Loads a js file, by wrapping 'require' into a Promise.