Unknown input property error in Angular Js
When we want to bind an ngModel to the input field we usually write it like this
but then the unknown input property error shows up. We will see how to solve this.<div>
<label>Created:</label>
<input type="text" [ERROR ->][(ngModel)]="test" placeholder="foo" />
</div>
In Anglular 2,4 and 5 before using [(ngModel)] make sure FormsModule is imported from Angular form. Also check for the line
import { FormsModule } from '@angular/forms';
in app.module.ts
Comments
0 comments
Please Sign in or Create an account to Post Comments