In AngularJS these two controller declarations are equivalent:
function BlahCtrl($scope, $http) { ... }
function BlahCtrl($http, $scope) { ... }
Both $http and $scope will be the correct variables no matter what order they are in. i.e. the variable named $http will always be passed an instance of the $http service.
How does Angular know which objects to pass in and in what order? I thought this kind of reflection was not possible with javascript.