title: Accessing directive attributes from nested directive
body: <p>I'm working on an email module that I'm going to plug into future projects. I have three directives: I have a message-list directive (displays basic information like from, subject and date), a summary directive (clickable links which display only the desired information (e.g. body)), and then a details directive (which displays the full view of the email).</p>
  
  <p>The challenge I am having is trying to put all three together to work with the same data via the controller. Essentially I want to show the top-level directive (the list directive) a model via the controller, and then the information from that model should be available for use in the nested directive views, but I don't want to change the attributes on these nested directives. </p>
  
  <p>list directive ---> summary directive(nested in the list directive) --> detail directive(accessible via click event in the summary directive) </p>
  
  <p>This is the parent directive:</p>
  
  <pre><code>messagingApp.directive('MessageList', ['$log', function ($log) {
  'use strict';
  
  return {
      templateUrl: 'directives/messagelist.tmpl.html',
      scope: {
          messages: '=',
          fromWho: '=',
          subject: '=',
          date: '=',
          details: '=',
          archiveMessage: '=',
          messageStatus: '=',
          messagePriority: '=',
          markAs: '&amp;',
          checkPriority: '&amp;',
          readMessage: '&amp;'
      }
  };
  }]);
  </code></pre>
  
  <p>And then in my view, these are the attributes that I want to be passed through to the nested directives (available to all three directives):</p>
  
  <pre><code>&lt;div ng-repeat="msg in message.allMessages&gt;
          &lt;message-list messages="msg" message-status="msg.status" message-priority="msg.priority" from-who="msg.from" subject="msg.subject" date="msg.date" details="msg.body" archive-message="archiveMessage(msg)" mark-as="markAs(msg)" check-priority="checkPriority(msg)" read-message="readMessage(msg)"&gt;&lt;/message-list&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the template for this directive, I then reference the other directives. </p>
  
  <p>Is there an easy way of doing this? I apologize if this is poorly worded. I am new to Angular and I have been researching this problem for quite some time but with no luck. Perhaps I am wording it incorrectly. </p>
  
  <p>Thanks in advance for your help.</p>