Angular报错:Type xxxComponent is part of the declarations of 2 modules: xxxxxx
报错截图以上

出现原因:当前两个模块有公用组件,
文件目录结构:
Angular报错:Type xxxComponent is part of the declarations of 2 modules: xxxxxx
machine-classify和tool-classify都引用了component下的creat-edit-model
当我点击tool-calssify时会在控制台报错

解决办法:
在creat-edit-model下创建moudle.ts文件,export当前组件即可解决

Angular报错:Type xxxComponent is part of the declarations of 2 modules: xxxxxx

相关文章:

  • 2022-12-23
  • 2022-02-19
  • 2021-07-26
  • 2021-09-05
  • 2022-12-23
  • 2021-09-10
  • 2022-02-04
  • 2022-12-23
猜你喜欢
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案