Basically I'm wondering what is the difference between declaring my controller between this approach:
myApp.controller('GreetingController', ['$scope', function($scope) {
$scope.greeting = 'Hola!';
}]);
And this:
myApp.controller('GreetingController', function($scope) {
$scope.greeting = 'Hola!';
}]);
I understand that the brackets in angular controller/directive/filter etc declarations are for dependency injections but the $scope that is in use of the Controller is for the controller only anyway. at least that's what I understand.
Please help me understand, I've been researching this matter quite a bit and not a lot of explanation regarding this matter are available online.
Thanks in advance.