I have a big module but just export 1 component, when I import that module does Angular load the whole module or just the exported components so that I could control the performance? I don't want to move the component to a common module 'cos it breaks the structure. Could anyone give me an advice?
Update code example
Saying I have ModuleA with 3 components and just export 1 of them:
@NgModule({
// ...
exports: [
ComponentA
],
declarations: [
ComponentA,
ComponentB,
ComponentC
]
})
export class ModuleA { }
In ModuleB, I import ModuleA so that I could use ComponentA:
@NgModule({
// ...
imports: [
ModuleA
]
})
export class ModuleB { }
When the app load ModuleB, does it just load ComponentA or it load all components of ModuleA?