This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Closed
Description
In step 5 in the Test section (http://docs.angularjs.org/tutorial/step_05), the example for testing the controller has the line beforeEach(inject(function(_$httpBackend_, $rootScope, $controller)
. Now the _$httpBackend_
looks weird after the whole previous discussion on DI and that Angular uses stuff with a leading $ and doesn't mention underscores.
I assume this is to prevent name clashing with the higher scoped $httpBackend in the code. If that's true, then a mention of this would be helpful instead of requiring one to guess that this is the reason. Else couldn't you just swap the variable names between the higher defined $httpBackend and the $httpBackend parameter to avoid this whole discussion in the tutorial?