Re: [AngularJS] Cross dependency injection

2014-05-30 Thread Antoine AGTHE
Your solution seems to be great. I personally found another way to manage to inject dependencies once, and transparently, using a ProxyInjector. This factory provides a method that creates a proxy object for the requested dependencies. Dependencies are injected only when it's necessary. For eac

Re: [AngularJS] Cross dependency injection

2014-05-29 Thread Eric Eslinger
I have a similar problem in my janky homegrown ORM - bidirectional parent-child has many and belongs to many type relationships are annoying at times. Personally, I do it by having an abstract base class that all the models in my ORM derive from. In the concrete class declaration, I do something l

[AngularJS] Cross dependency injection

2014-05-29 Thread Antoine AGTHE
Hi Guyz, I got a typical cross dependency case that I solved, but I don't like my solution, as it's not that much elegant. The situation is the following: I have ElementA,and ElementB, that are "classes" (that can be instantiated). ElementA instance holds the ID of a ElementB object, and Element