Open AndreyAttr opened 7 years ago
@tapy-lappy, Please investigate
The reason lays in following: in AppComponent we register one instance of interaction service - IS(we use useClass sugared syntax) for all the tree of AppComponent's components. It means when we subscribe in our component-descendants on actions in that IS, we use Singleton pattern - so we have one instance of IS for all components. Because we use Observable we multicast notification for all the observers(subscribers). And it's a reason why we have this wrong behavior.
It blocks us with going on https://github.com/AndreyAttr/Evo/issues/63
@tapy-lappy, see my comment here: https://github.com/AndreyAttr/Evo/issues/63#issuecomment-316504046 I used tokens to solve my part of problem but it seems it's the same that you have here. You just need to invent smt. for collections. Because my solution still provide one SINGLETON instance of interaction service for your case with collection of genes. I remove blocker status because on #63 we can move further.