Home  >  Forum  >  Angular
Post New Query

Cannot find control with unspecified name attribute



Asked on September 03, 2018
Hi, I am creating Angular application and creating a textarea as following. 

  <mat-form-field>
    <textarea matInput 
        placeholder="Comment" 
        [formControl]="commentFC" 
        (change)="onCommentChange()">
    </textarea>
  </mat-form-field>

When I run it, error occurred as

Error: "Cannot find control with unspecified name attribute"

What is wrong?



Replied on September 03, 2018
You need to create a FormControl such as 

commentFC = new FormControl()

in TS file.


Write Answer




©2019 concretepage.com | Privacy Policy | Contact Us