.config(['$httpProvider',
function($httpProvider) {
At config time you cannot depend on anything other than providers.
In general the syntax [’name’, function] is to express dependency that survives to magnification.
The AngularJS Dependency Engine, due to the way JavaScript does not work, in the sense that is misses types, can only resolve dependencies by name, thus it inspects the name of the arguments of your function and grab dependencies.
If a magnification process changes the naming AngularJS cannot resolve dependencies anymore, the annotation syntax is there to let your code “survive” to minification.
.m