masterach
masterach

Reputation: 447

is Child service inside child component visible in the Parent component?

Let's say that I have a app folder which is the root folder of my application.

If I now have a child folder called "second" inside the app folder (app is the parent folder and the child folder is "second") will the child folder which also has a service and is provided in his own module BE VISIBLE in the parent folder if I use the service (import it from the child) in the app.component.ts and consume it's fields, methods, or will it be only visible in the child folder and nowhere else?

Upvotes: 0

Views: 35

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657338

Which folder a service is stored in isn't related to where it will be available for injection. It only depends where you provide the service and where the module where the service is provided is imported.

Upvotes: 1

Related Questions