I have two modules (M1, M2) with two components on every one (CL1,CI2,CL3,CI4): A ListComponent and an ItemComponent. I created a shared module which has SearchComponent to looking for items to populate the lists. SearchComponent call a backend service and it returns a json with CI2 or CI4 data depending the case.
The problem is that I would like reusing CI2 and CI4 into SearchComponent to show search results, but they cannot be declared on SharchModule (SM) because they already are on M1 and M2. In addition this produces a circular dependency between M1 <-> SM and M2 <-> SM.
Any idea for be able reusing CI2 and CI4 into SM? The only way I found is duplicating CI2 and CI4 for SM but I would like avoid this.
Plunker with fast sample: https://plnkr.co/edit/a3xiBz6uUF7OcAaRLD4c
Line 30 of SearchComponent is where CI2, CI4 should be reused.