Which directive in AngularJS is primarily used for two-way data binding?

  • ng-bind
  • ng-bind-model
  • ng-data-bind
  • ng-model
The ng-model directive in AngularJS is primarily used for two-way data binding. It binds the value of HTML elements (like input, select, and textarea) to a property on the model. When the user interacts with the UI, changes are automatically reflected in the model, and vice versa. Understanding and using ng-model is essential for implementing efficient and dynamic forms in AngularJS applications.
Add your answer
Loading...

Leave a comment

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