angular - 角度应用程序中的材料设计问题
问题描述
嗨,我是角度的初学者,我想在我的应用程序中使用材料基本输入字段,我按照下面的博客来满足我的要求https://material.angular.io/components/input/overview但是当我运行我的代码时出错
Template parse errors:
'mat-form-field' is not a known element:
1. If 'mat-form-field' is an Angular component, then verify that it is part of this module.
2. If 'mat-form-field' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the
下面我给了我的stackblizz链接请帮助我我在哪里做错了
解决方案
你还没有MatInputModule
在你的.module.ts
在您的app.module.ts
import {MatInputModule} from '@angular/material/input';
imports : [
// Other modules
MatInputModule
]
推荐阅读
- firebase - 如何从 Firebase TimeStamp [Flutter] 中检索时间?
- git - 在同一台机器上配置多个 GIT 帐户,一个使用 Gerrit,另一个使用 GitHub
- java - 当 hibernate.query.conventional_java_constants 设置为 false 时,带有枚举的 Hibernate QuerySyntaxException
- excel - 在 Excel 中将数组展平为单列
- maven - 如何配置 maven 以使用基于项目所在文件夹或依赖坐标中的存储库?
- null - 使用 Python 将 NULL 插入 SQL Server 列
- python - 从另一个数据框列中的另一个单词列表中删除数据框列中每一行中的单词
- angular - Angular - 子组件不呈现来自 http 请求的数据更新
- json - JMeter PreProcessor - JSON EXtractor:嵌套对象
- java - 从图库中选择的图像 ImageView 消失了