Suppose I have a angularJS (1.x) controller like
var app= angular.module("myModule");
app.controller("myCtrl", myCtrl);
myCtrl.$inject=['$scope', myService];
function myCtrl($scope, myService) {
$scope.isOk = true;
$scope.function1 = function() {
....
}
$scope.function2 = function() {
....
}
}
********
Question: will ALL the methods inside this controller be executed when it is loaded ? Or will them just be executed when they are invoked ?