angular报错:Please add a @Pipe/@Directive/@Component annotation

Posted johnjackson

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了angular报错:Please add a @Pipe/@Directive/@Component annotation相关的知识,希望对你有一定的参考价值。

angular 报错 

ERROR Error: Uncaught (in promise): Error: Unexpected module ‘B‘ declared by the module ‘A‘. Please add a @Pipe/@Directive/@Component annotation.

当在一个"模块A"文件中导入(import)另一个"模块B"时, 被导入的模块需要添加到当前这个模块的@ngModule修饰器中的imports字段中,如果加到了

declarations的话,就会报上面的错误.
 

以上是关于angular报错:Please add a @Pipe/@Directive/@Component annotation的主要内容,如果未能解决你的问题,请参考以下文章

No application config found or it‘s not a valid config! Please add <dubbo:application name=“...“ />

No such application config! Please add dubbo:application

WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add

npm i命令报错“Please try running this command again as root/Administrator”

Pycharm报错解决:error:please select a valid Python interpreter

005.使用百度SDK写hello baidumap时,在布局xml文件中添加地图控件时;提示'clickable' attribute found, please also add