Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

matTextareaAutosize does not work in Angular Material 6.4.2

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?

like image 289
toothful Avatar asked Oct 28 '25 03:10

toothful


1 Answers

in you app.moudle

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

and then add MatInputModule to your app.moudle imports

like image 83
Reza Avatar answered Oct 29 '25 21:10

Reza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!