ng-model synchronizes input controls with scope properties; combined with validation directives for forms.
Important interview questions and answers
- Q: Why does this matter?
A: ng-model synchronizes input controls with scope properties; combined with validation directives for forms.
Self-check
- Summarize Two-way binding in one sentence.
- What would you try next in the playground?
Challenge
Two-way binding hands-on
- Edit the default code.
- Click Run in browser.
- Confirm preview or terminal output.
Done when: preview or terminal matches the lesson goal.
Tip: Prefer one-way data flow in new patches; use ng-model where legacy forms require two-way sync.
Interview prep
- What does ng-model do?
Syncs form control value with scope property and participates in validation state on the form controller.