Is it always necessary to set a method to the $scope in order for it to be visible or accessible in various parts of an application? For example, is it a good practice to use $scope
when defining a method that may only be used within one controller? Consider the following scenarios:
Scenario 1. $scope.myMethod = function(){};
Scenario 2. var myMethod= function(){};
What are the advantages and disadvantages of each scenario? If 'myMethod' is only used in one controller, should it still be assigned to the $scope? Is it unnecessary to add methods directly to the $scope object? What is considered best practice in this situation?
Note: I'm not looking for votes here, just interested in hearing about the pros and cons.