I'm a beginner in Angular and I'm curious to understand the reasoning behind injecting all our dependencies twice. Here is an example:
var analysisApp=angular.module('analysisApp',[]);
analysisApp.controller('analysisController',function($scope,$http,$cookies,$state,globalService){
});
However, the code can also be written like this:
var analysisApp=angular.module('analysisApp',[]);
analysisApp.controller('analysisController',['$scope','$http','$cookies','$state','globalService',function($scope,$http,$cookies,$state,globalService){
}]);
But why do we need to do this?