I have to objects that have a one-to-many type relationship. A can have
many Bs, let's say.
A( B ) {
members B[];
}
B( A ) {
member A;
}
Both have a factory that generate objects for their given type, but
obviously, I can't inject them in to each other directly. So, I'm thinking
I'll create a third class C that contains an A and the many Bs. That would
leave me with something like this:
C (Afactory, Bfactory) {
members B[];
member A;
}
A() {
}
B( A ) {
A member;
}
I don't mind doing this, but I'm not sure it's the best solutions. Cause
really, A and C are just different versions of the same thing. This is
currently working, but I'd love to know how others have solved a similar
problem.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.