165
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:
ng-click directive example using function
Example2:
Next TopicAngularJS ng-cloak Directive