Given two modules, ModuleA
and ModuleB
, in ModuleA
we want to use ServiceB
from ModuleB
. What should be done so the following code is functional?
@NgModule({
imports: [],
providers: [ServiceA],
declarations: [ComponentA],
bootstrap: [ComponentA]
)
}
export class ModuleA {}
@NgModule({
imports: [],
providers: [ServiceB],
declarations: [ComponentB],
bootstrap: [ComponentB]
)
}
export class ModuleB {}