I have started going through the Angular docs and wondered what is the difference between this controller constructor:
angular.module('myApp', [])
.controller('SomeController', function() {
this.qty = 1;
});
And this one:
angular.module('myApp', [])
.controller('SomeController', ['$scope', function($scope) {
$scope.qty = 1;
}]);
Which of the two is preferred and why?
What is the added value of the injected $scope object?