import
importModule(moduleName, parentName)
var importModule = require("can-util/js/import/import");
importModule("foo.stache").then(function(){
// module was imported
});
Parameters
- moduleName
{String}
:The module to be imported.
- parentName
{String}
:A parent module that will be used as a reference for resolving relative module imports.
Returns
{Promise}
:
A Promise that will resolve when the module has been imported.