what's the difference of defining controller's dependencies in array:
app.controller('IndexController', ['$rootScope', '$http', function($rootScope, $http) {
//some cool stuff
}]);
and injecting them right into the function like this:
app.controller('IndexController', function($rootScope, $http) {
//some cool stuff
});
Lot of posts and tutorials use the shorter version, so I'm wondering if there's any advantage of doing it the first way.
Thanks!