I already read the AngularJS documentation but still don't have an answer which I understand.
Why is this used twice? One time as array elements, the second as function parameters.
someModule.controller('MyController', ['$scope', 'greeter', function($scope, greeter) {
// ...
}]);
See Question&Answers more detail:os