I'm trying to communicate between a parent directive and its nested child 
directive, and the other way. I've managed to achieve this by using 
$broadcast and $emit, but because I'm passing in some arguments to the 
directives I've had to create isolated scope on my directives, so in order 
for the $broadcast/$emit to work I have to broadcast 'up a level' on the 
parent scope (scope.$parent.$broadcast). Now the broadcast is no longer 
just going to the nested child, but to all directives at the same level, 
which I don't want. I've created a plunker to show the issue, 
here<http://plnkr.co/edit/0l5kjZdDv1LQwarXJC9t?p=preview>. 
What I need is for when one of the buttons is pressed, only the child 
directive to receive the broadcast message, and vice-versa. Am I missing 
something, or is this not possible when using isolated scope?

-- 
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