Goal: Create behaviors using directives with communication between 2 sibling elements (each their own directive).
A behavior to use in example: The article content is hi
If there is a list of articles and its content we can do it without any directive, using ng-repeat
{{article.header}}
{{article.content}}
So you need to define the article model in controller. We are making use of local scope created by ng-repeat.
Update: Based on your feedback, you need to link them together.You can try
this is my header
this is content for the header above
and in your directive
use
link: function(scope, element,attrs) {
element.bind('click', function(){
$('#'+attrs.content).show();
}
}
And the final method could be to use $rootScope.$broadcast
and scope.$on
methods to communicate between to controllers. But in this approach you need to track from where the message came and who is the intended recipient who needs to process it.