.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
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.