PNS
PNS

Reputation: 770

HTML file error in Angular application in WebStorm

I am getting the error shown below in WebStorm. It is a brand new project where I am just testing a form. It doesn't happen until I run ng serve (and ng serve gives no errors and runs the application just fine).

If I delete my node_modules folder and reinstalls using npm install then I get no errors again until I run the project (or restarts my IDE it seems). I even tried creating a new project but still the same error(s) occur.

Does anyone have any idea what is going on here?! It seems to only be happening to new projects I create as well.

enter image description here

EDIT: Added image of module file (app.module.ts) I only have the one module.

enter image description here

EDIT 2: Component added as well.

enter image description here

Upvotes: 0

Views: 222

Answers (1)

Sachin Mamoru
Sachin Mamoru

Reputation: 486

You need to provide the formGroup in your typescript file.

 descriptionForm= new FormGroup({
  firstName: new FormControl(''),
  lastName: new FormControl('')
 });

Upvotes: 0

Related Questions