Recently, I decided to delve into the world of AngularJS. During my first tutorial sessions, I attempted to rename the $scope
variable and quickly realized that it caused everything to break.
phonecatApp.controller('PhoneListCtrl', function($scope) { ... }); // this works
phonecatApp.controller('PhoneListCtrl', function(foo) { ... }); // this does not work
But why? Isn't it just a local variable being passed to the callback function? Why is a specific name required?