Suggest an editImprove this articleRefine the answer for “What does the ngForm directive do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`ngForm`** is a directive that Angular automatically adds to any `<form>` tag when the form uses the template-driven approach. **Key point:** it creates an `NgForm` object, tracks the state of the whole form (`valid`, `invalid`, `touched`, `dirty`), and collects all fields with `ngModel` into a single structure.Shown above the full answer for quick recall.Answer (EN)Image`ngForm` is a directive that Angular **automatically adds to any** `<form>` **tag** when the form uses the template-driven approach. It: - creates an `NgForm` object that contains a `FormGroup`; - tracks the state of the whole form: `valid`, `invalid`, `touched`, `dirty`, and so on; - collects all fields with `ngModel` and binds them into a single structure; - allows the form to be accessed from the template (for example, via `#form="ngForm"`). Example: ```html <form #f="ngForm" (ngSubmit)="onSubmit(f)"> <input name="email" ngModel required> </form> ``` Here `f` is the `NgForm` object, which has access to the values (`f.value`) and status (`f.valid`) of the whole form.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.