I am having function in my controller.
$scope.TestFn = {
            func1: function() {
                console.log('in function TestFn func1')             
                },
            func2: function() {
                console.log('in function TestFn func2')             
                }   
        }
That i am calling in my directive as below,
<div ng-init="TestFn.func1()"><div>
This is working fine. What i want to know, what do we call this kind of functions arrangements. Like we are grouping relevant functions all together. And is it possible to have same way for declaring variables. For example,
$scope.Test.variable1 = 'value1';
$scope.Test.variable2 = 'value2';
Which i can use like {{Test.variable1}} or {{Test.variable2}}
It is essential for me to know because i am having many html template and want to keep all relevant functions and variables all together for easier management.
Thanks
ng-controller="TestCtrl as Test", and then call scoped variables with{{Test.variable1}}