The __________ directive in AngularJS is used to execute a function in the controller when a specified event occurs.

  • ng-bind
  • ng-click
  • ng-controller
  • ng-model
The ng-click directive in AngularJS is used to execute a function in the controller when a specified event (such as a button click) occurs. This directive binds the specified expression to the click event, allowing developers to define custom behaviors when the associated element is clicked. Understanding how to use ng-click is essential for handling user interactions in AngularJS applications.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *