(js) Improve Angular modules initialization

This commit is contained in:
Francis Lachapelle committed 2015-07-29 15:16:43 -04:00
1 parent 7e10cff395
commit d3a233b222
2 files changed
+18 -1

No files matched your search

@@ -69,6 +69,14 @@
return new Preferences(); // return unique instance
}];
/* Initialize module if necessary */
try {
angular.module('SOGo.PreferencesUI');
}
catch(e) {
angular.module('SOGo.PreferencesUI', ['SOGo.Common']);
}
/* Factory registration in Angular module */
angular.module('SOGo.PreferencesUI')
.factory('Preferences', Preferences.$factory);