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 ).
List item
using angular 9
Problem solved, my mistakes
I have this help anyone in need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With