Skip to content Skip to sidebar Skip to footer

$http.post Undefined Is Not A Function

I am trying to implement a simple $http post with angular within this controller. app.controller('LoginCtrl',['$scope','admin','$http',function($scope,$http,admin){ $scope.isAd

Solution 1:

Dependency injection order is wrong

app.controller('LoginCtrl', ['$scope', 'admin', '$http',function($scope, $http, admin) { ...

should be

app.controller('LoginCtrl', ['$scope', '$http', 'admin', function($scope, $http, admin) { ...

Post a Comment for "$http.post Undefined Is Not A Function"