SyntaxFix
Write A Post
Hire A Developer
Questions
In this case, no need for a directive. This does the job :
<button ng-click="count = count + 1" ng-init="count=0"> Increment </button> <span> count: {{count}} </span>
Source: https://docs.angularjs.org/api/ng/directive/ngClick