I have a module qApp
angular
.module('qApp', [
'ngCookies',
'ngRoute'
])
Later while program is running I dynamically load js scripts that contain other modules (lets call them plugin-modules).
Example:
angular
.module('q-plugin-email', [])
.constant('name', 'q-plugin-email')
.factory('factory', [
function() {
return {/*...*/}
}
])
.directive('ui', [
function() {
return {/*...*/}
}
]);
How do I actually add plugins to
qAppdependency list after the app module was created?Will it be possible to name factory and directive with the same name in every dependant plugin (so it was possible to follow the unique pattern creating plugins)