nz-input-group is not a known element的解决方法

简介: nz-input-group is not a known element的解决方法

遇到如下的错误消息:

image.pngFailed to compile.


src/app/ngrxdemo/searchbookcomponents/search-input/search-input.component.html:4:3 - error NG8001: ‘nz-input-group’ is not a known element:


If ‘nz-input-group’ is an Angular component, then verify that it is part of this module.

If ‘nz-input-group’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.

4


添加如下依赖到package.json:

“ng-zorro-antd”: “^7.5.1”,

image.pngnpm install:

image.png发现一系列warning,原因是因为ng-zorro-antd和Angular的版本不一致:

image.pngimage.pngimage.pngimage.png

相关文章
|
1月前
使用Form报错提示If ngModel is used within a form tag, either the name attribute must be set or the form
使用Form报错提示If ngModel is used within a form tag, either the name attribute must be set or the form
|
7月前
|
JavaScript
Element UI报错:Unknown custom element: <el-menu>
Element UI报错:Unknown custom element: <el-menu>
85 0
|
7月前
Element-UI中el-input输入值不显示
Element-UI中el-input输入值不显示
172 0
|
8月前
【element-ui用法】el-radio-group默认选择和数据回显问题的解决方案
【element-ui用法】el-radio-group默认选择和数据回显问题的解决方案
299 0
|
Linux
解决办法:error: <item> inner element must either be a resource reference or empty.
解决办法:error: <item> inner element must either be a resource reference or empty.
216 0
ADI
|
JavaScript 前端开发 API
[记录] input[type=file]属性详解
[记录] input[type=file]属性详解
ADI
243 0
Element UI - el-select 同时获取 value 和 label 的值
Element UI - el-select 同时获取 value 和 label 的值
526 0
|
Web App开发 JavaScript 数据安全/隐私保护
ie8下修改input的type属性报错
ie8下修改input的type属性报错
SAP WM Movement Type 里的‘Ref.Stor.Type Search’字段用法初探
SAP WM Movement Type 里的‘Ref.Stor.Type Search’字段用法初探
SAP WM Movement Type 里的‘Ref.Stor.Type Search’字段用法初探
|
JavaScript
click group list in left launchpad
click group list in left launchpad
107 0
click group list in left launchpad