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.
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 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 anameattribute- Dynamic
namebound 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
- Add
name="field"to every ngModel inside the form - Use
[ngModelOptions]="{standalone: true}"for helper controls - Switch to reactive forms for complex forms
Detailed fix by platform
Angular
<input name="email" [(ngModel)]="user.email">- Helper input:
<input [(ngModel)]="filter" [ngModelOptions]="{standalone: true}">
Code examples
name or standalone
<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
- Element — Which ngModel is missing a name?
- Binding — Is name bound dynamically?
- 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:
Similar errors
- Cannot find control with name Angular: Error: Cannot find control with name: 'email' (reactive forms)
- mat-form-field must contain a MatFormFieldControl Angular Material: Error: mat-form-field must contain a MatFormFieldControl
- NG01050 Angular: NG01050: formControlName must be used with a parent formGroup directive
Most viewed in Angular
- NullInjectorError Angular: NullInjectorError: No provider for X!
- NG0100 Angular: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked
- NullInjectorError: No provider for HttpClient! Angular: NullInjectorError: No provider for HttpClient! — provideHttpClient() missing
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 15 Oct 2026