Here is a angular code from this page: http://docs.angularjs.org/guide/controller
1 var myApp = angular.module('myApp',[]);
2
3 myApp.controller('GreetingCtrl', ['$scope', function($scope) {
4 $scope.greeting = 'Hola!';
5 }]);
On line #3 above, what is the purpose of the string '$scope'?
Can't I just do this?
myApp.controller('GreetingCtrl', function($scope) { ... })
What is the benefit of having an array and the name of the argument there?