'Angular component is not a known element

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



Solution 1:[1]

You need to declare the component inside the module.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1