4

I am trying apply auto-sizing on textarea in angular material 6.4.2 like below -

<mat-form-field>
      <textarea matInput [matTextareaAutosize]="true" placeholder="Task description" formControlName="description" [errorStateMatcher]="ErrorMatcher">
       </textarea>
</mat-form-field>

But it is throwing following error: Can't bind to 'matTextareaAutosize' since it isn't a known property of 'textarea'

What the wrong in my code?

toothful
  • 882
  • 3
  • 15
  • 25

1 Answers1

2

in you app.moudle

import {  MatInputModule } from '@angular/material';

and then add MatInputModule to your app.moudle imports

Reza
  • 18,865
  • 13
  • 88
  • 163