Dynamically load scripts in your Angular code.
Brought to life by WeStud.io
bower install ws-script-loader
var myapp = angular.module('myapp', ['wsScriptLoader']);
Anywhere in your code (controller, service, ...), inject wsScriptLoader
to your dependencies and use it as follows:
url
: script you want to loadcallback
: what to do when it's loaded
url
: script you want to load
A $q
promise.