I'm building an AngulrJS module that I intend to share, for free, with other developers via GitHub/bower. While my approach currently works, I'm concerned about name collisions. The way that I am currently setting up my module is like this:
var myModuleName = angular.module('myModuleName', []);
myModuleName.factory('$myFirstServiceName', function() {
...
});
myModuleName.factory('$mySecondServiceName', ['$q', function($q) {
...
}]);
myModuleName.factory('$myThirdServiceName', ['$q', function($q) {
...
}]);
My concern is that global 'myModuleName'. While this approach works, the name of my module isn't that "special". For that reason, I'm concerned it will collide with a developers existing stuff or cause other problems down the road.
Is there any way to more elegantly create a module where I don't have to worry about naming collisions?
Thank you!