<div ng-mousedown="count = count + 1" ng-init="count=0">Click me!</div>
<button ng-click="count = count + 1" ng-init="count=0">Click me!</button>
Now what confuses me, is when should i use ng-click and when should i use ng-mousedown?? I mean what exact difference is there between the two?
When should I use them?
You decide, they give you the tools, you build the application with them.
ng-mousedown will trigger whenever any of your mouse buttons is clicked over the element (it doesn't wait till you release the key), this can be used to have custom functionality for in your application depending on your needs (like a menu or zoom effect etc.)
ng-click will trigger when the left mouse button is pressed and released on that element, or when the active element from the keyboard navigation is activated (using tab and