mat-input-container' is not a known element

来源:2-5 Input 组件

慕函数4001562

2019-10-24

老师我安装的是angular8版本,可能有些api和课程中不一样,我在login中添加了mat-input-container 浏览器报错,
Uncaught Error: Template parse errors:
‘mat-input-container’ is not a known element:

  1. If ‘mat-input-container’ is an Angular component, then verify that it is part of this module.
  2. If ‘mat-input-container’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. ("


    [ERROR ->]

    </mat-in"): ng:///LoginModule/LoginComponent.html@5:8
    ’mat-card-action’ is not a known element:
  3. If ‘mat-card-action’ is an Angular component, then verify that it is part of this module.
  4. If ‘mat-card-action’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. ("


    [ERROR ->]

    还没有账号?注册


    忘记密码?找回


    "): ng:///LoginModule/LoginComponent.html@9:4

请问怎么解决。

写回答

1回答

接灰的电子产品

2019-10-24

material 相关的组件看官网,也可以参考git源码,https://github.com/wpcfan/taskmgr

0
1
慕函数4001562
非常感谢!老师
2019-10-24
共1条回复

Angular打造企业级协作平台,让你在Angular领域中出类拔萃

全网首个介绍官方 Material 组件库用法与 Redux 在 Angular 中的应用

998 学习 · 536 问题

查看课程