$scope
& $http
are provided as dependencies. $http
is characterized as a dependency, then AngularJS searches for an enrolled service with name $http
. The dominant part of the real-time applications use JavaScript code minification tools to diminish the size. These tools can rename variables to short variable names.
[javascript]
myApp.controller('SPController',function($scope,$http){
..........
});
[/javascript]
The preceding code can be minified into:
[javascript]
myApp.controller('SPController',function($s,$h){
...........
});
[/javascript]
App.js
has a definition of application module, while Controller.js
has a controller.