SyntaxFix
Write A Post
Hire A Developer
Questions
Just to complete Amit Garg answer, there are several ways to inject dependencies in AngularJS.
You can also use $inject to add a dependency:
$inject
var MyController = function($scope, $http) { // ... } MyController.$inject = ['$scope', '$http'];