I don't know that there is an accepted convention between the three supported methods for injecting dependencies within Angular.
That being said, I am currently working on a very large Angular project, and we consistently use the $inject
syntax to define our dependencies. The documentation also seems to be trending in this direction.
So my advice would be this.
Define All Your Dependencies As Objects
var SomeService = function($rootScope, $http, $q){
this.$rootScope = $rootScope;
this.$http = $http;
this.$q = $q;
};
SomeService.$inject = ['$rootScope', '$http', '$q'];
myModule.service('someService', SomeService);
This is going to make it a lot easier to reason about your code, and allow you to seperate out your services, directives, and controllers into different files.
Except for very small applications, I would stay away from using the anonymous declarations and the array syntax for all of my dependencies.