角分量不是已知元素

发布于 2025-01-21 21:45:23 字数 773 浏览 0 评论 0原文

最近,当我尝试运行服务命令时,我将Angular项目从Angular 8升级到Angular 9。

error NG8001: 'app-abcd-breadcrumb' is not a known element:

1. If 'app-abcd-breadcrumb' is an Angular component, then verify that it is part of this module.

2. If 'app-abcd-breadcrumb' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.


 error NG8001: 'router-outlet' is not a known element:
1. If 'router-outlet' is an Angular component, then verify that it is part of this module.

2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

5 <router-outlet></router-outlet>

有人可以帮我吗?这些组件是我为项目创建的组件。它不是任何库组件

I have recently upgraded my angular project from angular 8 to angular 9, when I try to run serve command I am getting below error.

error NG8001: 'app-abcd-breadcrumb' is not a known element:

1. If 'app-abcd-breadcrumb' is an Angular component, then verify that it is part of this module.

2. If 'app-abcd-breadcrumb' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.


 error NG8001: 'router-outlet' is not a known element:
1. If 'router-outlet' is an Angular component, then verify that it is part of this module.

2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

5 <router-outlet></router-outlet>

Can anyone please help me on this ? these components are the components created by me for the project. it is not any library component

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏天碎花小短裙 2025-01-28 21:45:23

您需要在模块内声明组件。

You need to declare the component inside the module.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文