Hi,

thanks for the ideas. Yes I think such a use case can be pretty complicated 
to handle in one service. I was just wondering if there may be already a 
solution, like $http cache returning only references to the same object or 
something. 

The current approach I use by passing data to the directives from a parent 
controllers works so far and often the parent controller also is a 
directive. Its just that over time some "main controllers" develop with 
more and more directives and data to pass.

On Wednesday, December 3, 2014 8:29:29 PM UTC+1, Sander Elias wrote:
>
> Hi,
>
> Well, In this case you might need to see on a per directive base what you 
> need. For example your directive 1 and 4 use their parent controller (Which 
> might be in yet another directive!) and your directive 2 and 3 use a 
> service. 
> You can create a service that takes care of everything you need, but 
> that's demanding some complicated stuff to be in there. Manual caching an 
> keeping references and stuff like that. It can be done, but it might be 
> overkill for what you are aiming for.
>
> Regards
> Sander
>  
>

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to