1.

Explain Ng-click Directive?

Answer»

ng-click directive represents a AngularJS click event.
In below example, we’ve added ng-click attribute to a HTML button and added an expression to UPDATED a MODEL. Then we can SEE the variation.

<p>Total click: {{ clickCounter }}</p></td>
<button ng-click = “clickCounter = clickCounter + 1”>Click Me!</button>

ng-click directive represents a AngularJS click event.
In below example, we’ve added ng-click attribute to a HTML button and added an expression to updated a model. Then we can see the variation.

<p>Total click: {{ clickCounter }}</p></td>
<button ng-click = “clickCounter = clickCounter + 1”>Click Me!</button>



Discussion

No Comment Found