liveBook · Manning

ngModel

ngModel is an Angular directive that synchronizes a form control's value with an application model through two-way binding.

How 2 Manning books explain it

Pro Angular 16

ngModel is an Angular directive that binds a form control's value to an application model.

How it is used
Simplifies two-way synchronization between HTML form controls and component properties.
How deep it goes
Explains binding syntax, FormsModule setup, live updates, and signal limitations without descending into directive internals.
Examples
Uses Material checkboxes, product-editing inputs, JSON interpolation, and a Create button to demonstrate synchronized model changes.
What you can do after
Apply ngModel to synchronize form controls with component properties and submit the resulting values through event handlers.

Read how Pro Angular 16 explains ngModel →

Modern Angular

ngModel is an Angular directive that synchronizes a form control's value with a component property through two-way binding.

How it is used
Synchronizes login-form inputs with a standalone component's credentials object.
How deep it goes
Shows template bindings and the required FormsModule import, but does not explain directive internals or broader form architecture.
Examples
Uses email and password inputs in a standalone login component, with required-field feedback and authentication submission.
What you can do after
Apply it via FormsModule to synchronize standalone login inputs with component state.

Read how Modern Angular explains ngModel →

Also covered in

Related concepts

Questions about ngModel

What is ngModel?

ngModel is an Angular directive that synchronizes a form control's value with an application model through two-way binding.

Which Manning books explain ngModel?

Pro Angular 16 and Modern Angular.

What is ngModel a kind of?

ngModel is a kind of directive. A directive is a framework-specific instruction attached to markup that controls processing, rendering, or the behavior of an element or template.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.