mirror of https://github.com/BTCPrivate/copay.git
angularLoad
This commit is contained in:
parent
39af059cee
commit
526bc53a7b
|
@ -21,8 +21,7 @@
|
||||||
"socket.io-client": ">=1.0.0",
|
"socket.io-client": ">=1.0.0",
|
||||||
"ng-idle": "*",
|
"ng-idle": "*",
|
||||||
"inherits": "~0.0.1",
|
"inherits": "~0.0.1",
|
||||||
"angular-load": "0.2.0",
|
lodash": "~2.4.1",
|
||||||
"lodash": "~2.4.1",
|
|
||||||
"angular-gravatar": "*",
|
"angular-gravatar": "*",
|
||||||
"angular-touch": "~1.3.0"
|
"angular-touch": "~1.3.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -38,10 +38,6 @@ var modules = [
|
||||||
'copayApp.directives',
|
'copayApp.directives',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (Object.keys(config.plugins).length)
|
|
||||||
modules.push('angularLoad');
|
|
||||||
|
|
||||||
|
|
||||||
var copayApp = window.copayApp = angular.module('copayApp', modules);
|
var copayApp = window.copayApp = angular.module('copayApp', modules);
|
||||||
|
|
||||||
copayApp.value('defaults', defaults);
|
copayApp.value('defaults', defaults);
|
||||||
|
|
|
@ -1,18 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.services').factory('pluginManager', function(angularLoad) {
|
angular.module('copayApp.services').factory('pluginManager', function() {
|
||||||
var pm = new copay.PluginManager(config);
|
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;
|
return pm;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue