How do angular2 master modules and submodules share components?

there is currently a header.component.ts public header component that I cannot use in other modules after I register with app.module.ts.
other modules are also registered with app.module.ts.

< H2 > app.module.ts < / H2 >
@NgModule({
    declarations : [ HeaderComponent ],
    imports : [ otherModule ]     // 
})
< H2 > other.module.ts < / H2 >
@NgModule({
    ...........
 })
export class otherModule {}
< H2 > other.component.ts < / H2 >
<div class="other-component">
    <header-component></header-component>   
 </div>

error report:

"header-component" is not a known element:
If" header-component" is an Angular component, then verify that it is part of this module.
Feb.28,2021

  1. Import
  2. in other modules
  3. or global import

submodules cannot import components in the parent module. If you want to share header components, import header components in each module you want to use.
sharing module is also something that the parent module can use exports out of the child module. You add what you need to share into one module, and then import

in other modules.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf626f-31fd7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf626f-31fd7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?