async-script:一个微小的 AngularJS 模块,用于加载 JS 文件并在加载时解析承诺

时间:2021-06-20 07:27:46
【文件属性】:
文件名称:async-script:一个微小的 AngularJS 模块,用于加载 JS 文件并在加载时解析承诺
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-20 07:27:46
JavaScript 异步脚本 加载一个 JS 文件并在完成后运行一些东西(通过 Promises) // inject "loadScriptAsync" function anywhere function (loadScriptAsync) { loadScriptAsync('http://the.script.com/script.js').then( function() { // called when the script is loaded }, function() { // called if the script fails to load }); } 代码
【文件预览】:
async-script-master
----async-script.js(1KB)
----README.md(458B)
----bower.json(409B)

网友评论