How to Solve Angular Error: error NG8002: Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘input‘.

The above is the error content ([(ngmodel)] bidirectional binding fails)

Solution: add in module.ts

import { FormsModule } from '@angular/forms';

imports:   [

     FormsModule,

    ...

],


In this way, you can use [(ngmodel)] two-way binding

Read More: