我正在尝试在角度材料6.4.2上的textarea上应用自动调整大小,如下所示 -
<mat-form-field>
<textarea matInput [matTextareaAutosize]="true" placeholder="Task description" formControlName="description" [errorStateMatcher]="ErrorMatcher">
</textarea>
</mat-form-field>
但它抛出以下错误:无法绑定到'matTextareaAutosize',因为它不是'textarea'的已知属性
我的代码有什么问题?
1 回答
在你
app.moudle
然后将
MatInputModule
添加到app.moudle
导入中