I don't understand the difference between these two types of angularjs controller definition, i have tried following codes and found both working
myApp.controller('GreetingController', ['$scope', function($scope) {
$scope.greeting = 'Hola!';
}]);
myApp.controller('GreetingController', function($scope) {
$scope.greeting = 'Hola!';
});
First one cares about minification.
In this controller:
arguments will be minimized to some short values and dependency injection will not work.
Please look at: