AngularJS ng-click Directive
AngularJS Example
The count variable increments automatically every time the button is clicked:
Definition and Usage
The ng-click directive tells AngularJS what to do when an HTML element is clicked.
Syntax
Supported by all HTML elements.
Parameter Values
| Value | Description |
|---|---|
| expression | The expression to be executed when the element is clicked. |