Data Binding can be best described as a technique that is used to link the application’s data to the view layer. It makes communication between the DOM (Document Object Model) and the TypeScript code of our component.
In other words, data binding is a communication between the typescript code of our component and our template, which is visible to the user. Data Binding allows us to define interactive applications easily and efficiently without worrying about pushing and pulling data.
There are two types of data binding –
- One-way data-binding: One-way data binding is used to bind the data from the component to the view (Document Object Model) or vice versa. One way data binding is a unidirectional data binding method, that is, we can either bind the data from the component to the view or bind the data from the view to the component.
- Two-way data binding: Two-way data binding in Angular version 8 helps the users to exchange data from the component to the view and from the view to the component. Bi-directional communication is established in this method.