I'm trying to have an angular module for each backend microservice. So to keep each module independent and clean while they use each other's components when available and a default "service-is-not-available" component, when the component is not found in the container.
Example Scenario: Let's say there are a sales and accounting module. The sales module needs a component with selector: 'total-price'. Sales module and Accounting module are both used by the main module, but the sales doesn't know about accounting. When I call the 'total-price' tag in sales I want the main module to find it in the accounting and display it in the sales.
Here the 'total-price' tag selector works like an abstraction (OO interface) which it's implementation is placed at accounting module, and the main module should have an IOC to search and find the implementation an inject it to the sales, and return a not found view if the view is unavailable (kind of like null object pattern). This may also help with handling authorization and returning a proper view whenever the user is not permitted to see some component.
Code Sample:
This is a sample code for the scenario but it doesn't compile, because as my question states I'm looking for a way of orchestrating, and composing the UI and injecting the <total-price>
component to sales without referencing the accounting module directly.