In simple words, it is passing objects to functions
Angular annotates (converts them to a string) all the arguments passed to the controller function and check if it contains any of the default services (e.g. $scope
, $http
). It then parses those services returns them as an object in place of that argument to the calling function. The order of the parameters doesn't matter in this case as Angular inserts the service object in its right place.
It is the service that is being passed to the controller function. It is a bond between the DOM and the JS.