Supposed I have two modules for AngularJS, e.g. foo
and bar
, and both of them define a service called baz
.
In my application I depend on them by saying:
var app = angular.module('app', [ 'foo', 'bar' ]);
Then I can try to use the baz
service in a controller by using
app.controller('blaController', [ '$scope', 'baz', function($scope, baz) {
// ...
}]);
How can I define which of the two services I'd like to use? Is there something such as a fully-qualified name?