Introduction
Data binding is one of the most important features in any language. It allows us to define communication (synchronization) between the model and view. Data binding is passed from component to view and from view to the component.
Types of Data Binding in Angular
String Interpolation: The type of one-way data binding where the text is between a set of curly braces often uses the name of a component property. The syntax of string interpolation is to use double curly braces {{code}}, also known as moustache syntax.
Property Binding (one-way data binding): Property binding is a methodology, which will assist you to bind values to the properties of HTML elements.
- <button [disabled] = "isDisabled">Button disabled! </button>
- export class AppComponent {
- isDisabled: boolean = true;
- }
The event binding system provides us a way to attach a method defined in a component with an event.
The following snippet event on a button:
<button class='btn' (click)='onClick()'>Submit</button>
- <button (click)="onClick()">Click me!</button>
- export class ExampleComponent {
- onClick() {
- }
- }
Example
1) This means No-Binding
- <input name="txtNoBinding" ngModel> {{txtNoBinding}}
- <input name="txtOneWayBinding" [ngModel]="txtOneWayBinding"> {{txtOneWayBinding}}
- <input name="txtFirstTwoWayBinding" [ngModel]="txtFirstTwoWayBinding" (ngModelChange)="txtFirstTwoWayBinding=$evnt"> {{txtFirstTwoWayBinding
- <input name="txtSecTwoWayBinding" [(ngModel)]="txtSecTwoWayBinding" > {{txtSecTwoWayBinding}}
- <input [value]='name' (input)='name = $event.target.value'>{{name}}


After changes

Summary
In this article, we learned about the Angular data binding process and its types.
Sundaram SubramanianPosted Nov 18, 2019, 10:16 PM
Good one. Explained well.
Vijayakumar ManiPosted Nov 16, 2019, 1:56 AM
Good One..
Sourav Kumar DasPosted Nov 14, 2019, 10:45 PM
Nice Article.