If you have a f.eks button, you need to use ng-click="myFunctionName()" on the button itself.
And in the script file you use myFunctionName = $scope.function(){ yourCode... }
If you have taken care of a completely new one for Angular ... you should read a little about it, since it basically stays away from the DOM, takes βcontrolβ of your web page and needs ng-app , ng-controller and uses $scope for storing states for content and data.
source share