Frage im Vorstellungsgespräch bei Tata Consultancy Services

How to bind data in angular.

Antwort im Vorstellungsgespräch

Anonym

27. Mai 2025

In Angular, data binding is the process to connect the data between a component's (TypeScript) file and view (HTML template). There are mainly 4 types of data binding, 1. Interpolation - used to bind data of component property to the view. ex: <h1> {{ title}} </h1> 2. Property binding - used to bind the DOM element properties to the component's values ex: 3. Event Binding - Used to bind the events like Click with the methods in the components 4. Two-way Binding (Model binding) - It syncs data in both directions between the component's property and view. Mostly used in HTML forms ex: Angular supports Reactive Forms for more advance form handling, where we use FormControl and FormGroup for data bindings