• Loads a js file, by wrapping 'require' into a Promise.

    Parameters

    • clazzes: string | string[] = []

      class names to load.

    • Optionaloptions: LoadJsOptions

      the loading options.

    Returns ExtendedPromise<any>

    A promise resolving the js file(s).

    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];
    // ...
    });