I am new to AngularJS. I try to find out whats the difference between these two controller definitions:
app.controller('simpleController', ['$scope', function($scope) {
}]);
app.controller('simpleController', function($scope) {
});
I always use the second example, but sometimes I see people using the first example. Why should I do that? Is the controller in the first example inheriting another $scope variable?