# Template-Driven Forms — Angular Fundamentals: Components, Signals and Routing

Source: https://www.skillbyai.com/en/angular/ng-template-driven-forms

> Build simple forms mostly in the template with ngModel, ngForm and ngSubmit.

## A basic form

`ngModel` on each field builds up the form's value; `ngSubmit` fires when the form is submitted.

```html
<form #f="ngForm" (ngSubmit)="onSubmit(f.value)">
  <input name="email" [(ngModel)]="email" required>
  <button type="submit">Sign up</button>
</form>
```

## Good for simple cases

Template-driven forms suit short, simple forms. Angular manages the form model behind the scenes, so there's less TypeScript to write.
