A controller in AngularJS is defined using the _________ method.

  • controller
  • createController
  • defineController
  • ngController
A controller in AngularJS is defined using the ngController directive. This directive is used to attach a controller to the HTML element it is declared on. The ngController directive takes the name of the controller as its attribute value, allowing the developer to specify which controller should be associated with a particular section of the view. Understanding how to define controllers is fundamental for organizing and managing application logic in AngularJS.
Add your answer
Loading...

Leave a comment

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