I am new to angular and when I read tutorials I see two different methods of declaring dependencies in controllers:
1)
angular.module("myApp",[]).controller('MyController, function($scope, $localStorage){
});
And others have a little different way:
2)
angular.module("myApp",[]).controller('MyController, ['$scope', '$localStorage', function($scope,$localStorage){
}]);
The second way seems to be redundant to me since I have to specify $scope and $localStorage twice? What is the difference between these two ways of defining a controller?