Easy Tutorial
❮ Ng Ng Switch Ng Ng Change ❯

AngularJS ng-click Directive

AngularJS Reference Manual


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.

AngularJS Reference Manual

❮ Ng Ng Switch Ng Ng Change ❯