in Angular by (31.7k points)
What is Data Binding? How many ways it can be done?

1 Answer

0 votes
by (23.9k points)
In order to connect application data with the DOM (Data Object Model), data binding is used. It happens between the template (HTML) and component (TypeScript). There are 3 ways to achieve data binding:

Event Binding – Enables the application to respond to user input in the target environment

Property Binding – Enables interpolation of values computed from application data into the HTML

Two-way Binding – Changes made in the application state gets automatically reflected in the view and vice-versa. The ngModel directive is used for achieving this type of data binding.

Related questions

+1 vote
asked Jan 15, 2020 in Angular by rahuljain1 (6.5k points)
0 votes
asked Jul 11 in Angular by rahuljain1 (6.5k points)
0 votes
asked Sep 20, 2020 in XML by Robindeniel (20.8k points)
0 votes
0 votes
asked Jul 10 in Angular by Robindeniel (20.8k points)
0 votes
asked Feb 5, 2021 in Angular by SakshiSharma (32.2k points)
...