I am using https://github.com/johnpapa/angular-styleguide convention.
Inside section Function Declarations to Hide Implementation Details
How to use function in side html when i bind it to this like:
function AvengersCtrl() {
var vm = this;
vm.activate = activate;
function activate() {
alert("activate");
}
}
and use it in html:
<body ng-controller="AvengersCtrl">...
<button ng-click="activate()"></button>
</body>
when i use scope instead of this it works
$scope.activate = activate;