# Angular: NG01050: formControlName must be used with a parent formGroup directive

**Code:** `NG01050` · **Category:** Angular · **Seen on:** Angular, TypeScript

`formControlName` is used outside any `[formGroup]` — the control has no form to belong to.

## Meaning

Reactive form controls attach to a parent `FormGroup`. The `[formGroup]` directive must wrap the inputs in the same template (it does not cross component boundaries), and `ReactiveFormsModule` must be imported. For a standalone control use `[formControl]` instead.

## Common causes

- Missing `[formGroup]="form"` on the surrounding `<form>` or element
- Input placed in a child component whose template has no `[formGroup]`
- `ReactiveFormsModule` not imported (so `[formGroup]` is silently ignored)
- Using `formControlName` where `[formControl]` is meant
- `form` is undefined when the template renders

## Quick fix

1. Wrap the inputs in `<form [formGroup]="form">`
2. Import `ReactiveFormsModule`
3. Use `[formControl]="ctrl"` for a stand-alone control

## Detailed fix by platform

### Angular

1. `<form [formGroup]="form"><input formControlName="name"></form>` and `imports: [ReactiveFormsModule]`

## Code examples

### Standalone control vs grouped control

```html
<!-- grouped -->
<form [formGroup]="form"><input formControlName="name"></form>

<!-- stand-alone -->
<input [formControl]="search">
```

## How to diagnose

1. **Parent** — Is [formGroup] in the same template?
2. **Module** — ReactiveFormsModule imported?
3. **Child** — Is the input inside a child component?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/angular/ng01050-formcontrolname-without-formgroup)
