angularLoad

This commit is contained in:
Matias Alejo Garcia 2014-12-05 12:12:51 -03:00
parent 39af059cee
commit 526bc53a7b
3 changed files with 2 additions and 19 deletions

View File

@ -21,8 +21,7 @@
"socket.io-client": ">=1.0.0",
"ng-idle": "*",
"inherits": "~0.0.1",
"angular-load": "0.2.0",
"lodash": "~2.4.1",
lodash": "~2.4.1",
"angular-gravatar": "*",
"angular-touch": "~1.3.0"
},

View File

@ -38,10 +38,6 @@ var modules = [
'copayApp.directives',
];
if (Object.keys(config.plugins).length)
modules.push('angularLoad');
var copayApp = window.copayApp = angular.module('copayApp', modules);
copayApp.value('defaults', defaults);

View File

@ -1,18 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('pluginManager', function(angularLoad) {
angular.module('copayApp.services').factory('pluginManager', function() {
var pm = new copay.PluginManager(config);
var scripts = pm.scripts;
for(var ii in scripts){
var src = scripts[ii].src;
console.log('\tLoading ',src); //TODO
angularLoad.loadScript(src)
.then(scripts[ii].then || null)
.catch(function() {
throw new Error('Loading ' + src);
})
}
return pm;
});