It makes no difference, it all depends on your programming style. ng-click , I think, by far the most popular style.
When you create your own directive, you should always transfer it to javascript, and then when you put it on an element in your html, you should use the lowercase version, shared by your favorite taste. I always do it like this:
angular.module('Test', []).directive('testDirective', function(){ });
and then:
<div test-directive></div>
In angular docs :
Best practice: Prefer using a dash-delimited format (e.g. ng-bind for ngBind). If you want to use the HTML validation tool, you can instead use the version with the data prefix (for example, data-ng-bind for ngBind). The other forms shown above are accepted for hereditary reasons, but we advise you to avoid them.
theJoeBiz
source share