0

Since it looks like the modules in Angular are near the end of their life, and stand-alone components are the future, how can we provide dependencies in the same way as when a module is used?

With modules, we have three levels of dependency provisioning - root, module, and component. Since the modules are gone, how could a dependency be provided for a couple of components in the same way as with a module?

For example, our team is developing an Angular library. We have a couple of components that are using the same service. This service should have just one instance that is shared between them. How can I provide same service instance to all those components and not provide it in the root?

I do not like the idea that a library should implicitly add dependencies to the consuming application.

1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Commented Jun 26 at 22:07

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.