New to angular.js.
Are there any drawbacks of using $scope with every function declared in the applications controller though we don't intend to use them in the view? in the below example is there any drawback or advantage of following the "example 2" style of coding?
In both the examples we intend to show only the someFunc1 in the view
Example 1
var app = angular.module('def',[]);
app.controller('abcctrl' , []) {
$scope.function someFunc1(){
someFunc2();
}
function someFunc2(){
}
}]);
Example 2
var app = angular.module('def',[]);
app.controller('abcctrl' , []) {
$scope.someFuc1 = function(){
$scope.someFunc2();
};
$scope.someFuc2 = function(){
};
}]);