angular报错信息之’zmz-select’ is not a known element: //“zmz select”不是已知元素:
当前错误原因是我们没有在NgModule上暴露出去我们写的组件所有会出现不是已知的元素
vendor.js:30013 Uncaught Error: Template parse errors:
'zmz-select' is not a known element:
If 'zmz-select' is an Angular component, then verify that it is part of this module.
If 'zmz-select' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
</div>
</div>
[ERROR ->]<zmz-select></zmz-select>
</section>
"): ng:///AppRoutingModule/AboutComponent.html@103:4
at syntaxError (vendor.js:30013)
at TemplateParser.parse (vendor.js:42980)
at JitCompiler._parseTemplate (vendor.js:51606)
at JitCompiler._compileTemplate (vendor.js:51594)
at vendor.js:51538
at Set.forEach (<anonymous>)
at JitCompiler._compileComponents (vendor.js:51538)
at vendor.js:51451
at Object.then (vendor.js:30004)
at JitCompiler._compileModuleAndComponents (vendor.js:51450)
在NgModule上的declarations数组中添加我们要暴露的组件
本文地址:https://www.zhuimengzhu.com/details/204.html
转载地址:暂无
转载说明:转载时请在文首注明来源zhuimengzhu.com 及教程作者,并附本文链接。谢谢各位编辑同仁配合。zhuimengzhu 保留追究相应责任的权利。