The ng-model attribute is used for,
- Binding controls such as input, text area and select in the view into the model.
- Provide a validation behavior - for example a validation can be added to a textbox that only numeric characters can be entered into the textbox.
- The ng-model attribute maintains the state of the control (By state, we mean that the control and the data is bound to be always kept in sync. If the value of our data changes , it will automatically change the value in the control and vice versa)
No comments:
Post a Comment