Template-driven forms

Angular template-driven forms define their model in the HTML, with FormsModule and the ngModel directive to bind a field to a property. Simpler to write, they suit short forms, but are less explicit and harder to test than reactive forms.

Example

<input name="nom" [(ngModel)]="nom" required>

Related concepts

The whole glossary