In my experience, when defining a controller I often come across these two ways:
University.controller('ClassroomController', function($scope){
//do stuff
});
What separates the first way from this alternative method?
var classroomController = function ($scope){
//do stuff
}
University.controller('ClassroomController',['$scope',classroomController])
I have yet to find tutorials that explain the benefits of the second type of declaration.