I have the following Angular function:
$scope.updateStatus = function(user) { $http({ url: user.update_path, method: \"POST\",
Just to complete Amit Garg answer, there are several ways to inject dependencies in AngularJS.
You can also use $inject to add a dependency:
var MyController = function($scope, $http) { // ... } MyController.$inject = ['$scope', '$http'];