Data Binding
Four bindings. Interpolation {{ name }} — text out. Property [disabled]="saving" — element property in. Event (click)="save()" — user action in. Two-way [(ngModel)]="name" — both. Say all four in the viva.
Board: name starts empty. Type Asha. [(ngModel)] updates the class. Click Save. (click) runs save(). Don’t mix [value] and [(ngModel)] on the same input.
Trap — using href on a button and wondering why the page reloads. Use (click). FormsModule is required for ngModel.
class.name ──{{ }}──► text
class.saving ──[disabled]──► input
click ──(click)──► save()
input ◄──[(ngModel)]──► nameExam tip
Name four bindings + one tiny form.