Javatpoint Logo
Javatpoint Logo

AngularJS ng-click Directive

The AngularJS ng-click directive facilitates you to specify custom behavior when an element is clicked. So, it is responsible for the result what you get after clicking.

It is supported by all HTML elements.

Syntax:

Parameter explanation:

expression: It specifies an expression that is executed when an element is clicked.

Let's take an example to demonstrate the ng-click directive.

See this example:

Example1:

Test it Now

ng-click directive example using function

Example2:

Test it Now




Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA