$ http不是函数(AngularJS)

Tyl*_*r L 1 angularjs

我确定$ scope在$ http之前,但我仍然收到此错误!

angular.module('management')
    .service('Requests', function () { /* ... */ })
    .controller('RequestsOffWork', ['$scope', '$stateParams', '$location', 
                                  'Authentication', '$http', 'Requests',
        function ($scope, $stateParams, $location, $http, Authentication, Requests) {
....
}
Run Code Online (Sandbox Code Playgroud)

Sam*_*Sam 5

您的参数不按顺序排列.

'$ scope','$ stateParams','$ location','Authentication','$ http','Requests'

$ scope,$ stateParams,$ location,$ http,身份验证,请求

切换$httpAuthentication在两个位置之一.