Angular: NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'

The template uses a property binding that no imported directive provides — for ngModel, FormsModule isn’t imported.

Seen on: Angular

Meaning

Standalone components must import FormsModule (ngModel), ReactiveFormsModule (formControl, formGroup) or the component/directive defining the input. Typos in input names give the same error.

Common causes

  • FormsModule/ReactiveFormsModule not imported in the component
  • Child component not imported (standalone)
  • Typo in the @Input name
  • Unknown attribute instead of property binding

⚡ Quick fix

  1. Import FormsModule/ReactiveFormsModule in the standalone component
  2. Import the child component
  3. Check the @Input() name

Detailed fix by platform

TypeScript

  1. typescript
    @Component({
      standalone: true,
      imports: [FormsModule],
      template: `<input [(ngModel)]="name">`
    })
    export class ProfileComponent { name = ""; }

How to diagnose

  1. Property — Which binding?
  2. Imports — Component imports array

🔧 Still not fixed?

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

🧠 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.