I have the following question that I can't find what way is better. When doing dependency injection on AngularJS, what is the difference between these alternatives:
app.controller(‘controllerName’, [‘service1’, ‘service2’, function(service1, service2){…}])
Or
app.controller(‘controllerName’, function(service1, service2){…})
I think that the second one is much better because it does not inject the dependency twice, but does have any negative situation? Is the first one contribute with something that the second one not?