Data Input Using NgModel
Learn how to handle data input in Ionic apps using Angular's NgModel.
Data input
Handling data input is an integral part of most web and mobile applications. Thanks to the Angular framework, we have several ways in which we can handle data input in our Ionic apps:
- Two-way data binding using
NgModel
- FormBuilder
- Template-driven forms
Two-way data binding using NgModel
Angular’s NgModel
directive allows us to implement a concept known as two-way data binding to form input fields in our templates.
Two-way data binding is a term used to describe the association between the value of a template input field and the value of a variable in the component class.
Using the NgModel
directive, values can be set in both directions, ...