Components & Data Binding
Learn Components & Data Binding (Angular Fundamentals, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Data Binding Angular offers 4 kinds of binding between the component class and its template: 1. Interpolation: {{ value }} - display a value. 2. Property Binding: [property]="value" - set a DOM property. 3. Event Binding: (event)="handler()" - respond to DOM events. 4. Two-Way Binding: [(ngModel)]="value" - keep a form input and a property in sync.