FormsModule Error - Can't bind to 'ngModel' since it isn't a known property of 'input'. #765

Closed
opened 2025-08-09 17:17:35 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @neil-gilbert on 5/12/2017

Using the latest template from Steve (Angular 4.0), #930

I've added the following lines to app.module.client.ts file :
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
and added them both to the Imports[]

I then ran the following command : webpack --config webpack.config.vendor.js

I've added a form into my app and keep getting the following error : Can't bind to 'ngModel' since it isn't a known property of 'input'.

If i comment out the form from the HTML it works ok...... but if i then un-comment the form it then works ok (i.e. the form works and no errors are displayed)
It seems that something is happening in the HMR to make this work but I'm not sure what!?

*Originally created by @neil-gilbert on 5/12/2017* Using the latest template from Steve (Angular 4.0), #930 I've added the following lines to app.module.client.ts file : **import { FormsModule, ReactiveFormsModule } from '@angular/forms';** and added them both to the Imports[] I then ran the following command : webpack --config webpack.config.vendor.js I've added a form into my app and keep getting the following error : Can't bind to 'ngModel' since it isn't a known property of 'input'. If i comment out the form from the HTML it works ok...... but if i then un-comment the form it then works ok (i.e. the form works and no errors are displayed) It seems that something is happening in the HMR to make this work but I'm not sure what!?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#765
No description provided.