Which directive is used for binding HTML attributes to model data?
- ng-attribute
- ng-bind
- ng-bind-model
- ng-model
The ng-model directive is used for binding HTML attributes to model data in AngularJS. It creates a two-way binding between the view (HTML) and the model, allowing changes in one to automatically reflect in the other. Using ng-model is essential for handling user input, form validation, and dynamically updating the model based on user interactions.
Loading...
Related Quiz
- Which directive in AngularJS is primarily used for two-way data binding?
- When integrating with an external API in AngularJS, what format is typically used for data exchange?
- What is the primary function of the scope in AngularJS?
- _________ in AngularJS's MVC ensures synchronization between the model and the view.
- In a complex AngularJS application, how does efficient scope management contribute to performance optimization?