NG01352 Angular Origin: On your device Last updated 15 Oct 2026

Angular: NG01352: If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as 'standalone'

An [(ngModel)] input sits inside a <form> but has no name, so Angular cannot register it as a form control.

Exact message you may see If ngModel is used within a form tag, either the name attribute must be seteither the name attribute must be set or the form control must be defined as 'standalone' in ngModelOptions
Seen on: Angular TypeScript

Meaning

In template-driven forms every ngModel inside a <form> registers under its name attribute. Add a name, or tell Angular the control is not part of the form with [ngModelOptions]="{standalone: true}".

Common causes

  • [(ngModel)] inside <form> without a name attribute
  • Dynamic name bound after render ([name] empty)
  • ngModel used on buttons or helper inputs that should not join the form
  • Copied input from outside a form into a form

⚡ Quick fix

  1. Add name="field" to every ngModel inside the form
  2. Use [ngModelOptions]="{standalone: true}" for helper controls
  3. Switch to reactive forms for complex forms

Detailed fix by platform

Angular

  1. <input name="email" [(ngModel)]="user.email">
  2. Helper input: <input [(ngModel)]="filter" [ngModelOptions]="{standalone: true}">

Code examples

name or standalone

html
<form #f="ngForm">
  <input name="email" [(ngModel)]="user.email" required>
  <input [(ngModel)]="search" [ngModelOptions]="{standalone: true}">   <!-- not part of the form -->
</form>

How to diagnose

  1. Element — Which ngModel is missing a name?
  2. Binding — Is name bound dynamically?
  3. Intent — Should it join the form?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Cannot find control with name — Angular: Error: Cannot find control with name: 'email' (reactive forms) (Angular)Cannot find control w…mat-form-field must contain a MatFormFieldControl — Angular Material: Error: mat-form-field must contain a MatFormFieldControl (Angular)mat-form-field must c…NG01050 — Angular: NG01050: formControlName must be used with a parent formGroup directive (Angular)NG01050NG01203 — Angular: NG01203: No value accessor for form control with name: 'x' (ControlValueAccessor missing) (Angular)NG01203NG8002 — Angular: NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input' (Angular)NG8002NG8003 — Angular: NG8003: No directive found with exportAs 'ngForm' (template reference variable) (Angular)NG8003NG01352

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.