DESIRED STRUCTURE and WORKING STRUCTURE in IMAGE below please see it first.
folder+componet+module structure and imports details IMAGE
ERROR:
ERROR in app/layouts/homepage/homepage.component.html:1:1 - error NG8001: 'app-header' is not a known element:
1. If 'app-header' is an Angular component, then verify that it is part of this module.
2. If 'app-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
1 <app-header></app-header>
~~~~~~~~~~~~~~~~~~~~~~~~~
app/layouts/homepage/homepage.component.ts:10:16
10 templateUrl: './homepage.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I don't want to import (SharedModule)shared.module.ts in app.module.ts, just want SharedModule in the modules where it has been used (homepage.module.ts + addNewUser.module.ts ).
checked:
List item
- imported and exported HeaderComponent (header.component.ts) in shared.module.ts
- imported (SharedModule)shared.module.ts in both homepage.module.ts + addNewUser.module.ts
- imported HomepageModule + AddNewUserModule in app.module.ts
- restarted CLI + PC
using angular 9