Suggest an editImprove this articleRefine the answer for “What does ngModel do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The `ngModel` directive in Angular provides **two-way data binding** between a component property and a form element (input, select, textarea). **Key point:** `ngModel` synchronizes the state of the model and the view, making it easy to work with forms and user input.Shown above the full answer for quick recall.Answer (EN)ImageThe `ngModel` directive in Angular provides **two-way data binding** between a component property and a form element (input, select, textarea). How it works: 1. The value of the component property is displayed in the form element. 2. Any change in the form element automatically updates the component property. 3. Used together with `FormsModule`. Example: ```html <input [(ngModel)]="username" placeholder="Enter your name"> <p>Hello, {{ username }}!</p> ``` ```typescript username = ''; ``` > Conclusion: `ngModel` synchronizes **the state of the model and the view**, making it easy to work with forms and user input.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.