1.0.0 • Published 9 years ago
angular-scriptloader v1.0.0
angular-scriptloader
Script loader for Angular. Inject scripts and returns a promise. Won't inject the same script twice.
NPM
npm i angular-scriptloaderSetup
angular.module('yourApp', [
'nb.scriptloader'
]);Service
Loading a script.
$scriptLoader.load('/example.js')
.then(function() {
//..
});Loading scripts concurrently.
$q.all([$scriptLoader.load('/example.js'), $scriptLoader.load('/example2.js')])
.then(function() {
//..
});1.0.0
9 years ago