我正在尝试在角度材料 6.4.2 中的 textarea 上应用自动调整大小,如下所示 -
<mat-form-field>
<textarea matInput [matTextareaAutosize]="true" placeholder="Task description" formControlName="description" [errorStateMatcher]="ErrorMatcher">
</textarea>
</mat-form-field>
但它引发以下错误:无法绑定到“matTextareaAutosize”,因为它不是“textarea”的已知属性
我的代码有什么问题?