async-script

A tiny AngularJS module to load JS files and resolve a promise on load

Added by: Sam Deering

GitHub

Repository

darlanalves/async-script

Stats

Stars: 0

Watchers: 0

Forks: 0

Module Description

async-script

Load a JS file and run something once it is done (via 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
        });
}

Code

Module stats last updated: 2015-04-12 22:45:05

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!