title: AngularJS: Accessing child elements in directive
body: <p>I want to prettify my main HTML and want to use own directives to create a tab box.
  I want to write the code for the tab box like this:</p>
  
  <pre><code>&lt;my-tab-box&gt;
    &lt;my-tab label="Tab 1" active="true"&gt;Content 1&lt;/my-tab&gt;
    &lt;my-tab label="Tab 2"&gt;Content 2&lt;/my-tab&gt;
  &lt;/my-tab-box&gt;
  </code></pre>
  
  <p>Angular should translate the above code to something like:</p>
  
  <pre><code>&lt;div class="tab-box"&gt;
    &lt;ul&gt;
      &lt;li class="active"&gt;Tab 1&lt;/li&gt;
      &lt;li&gt;Tab 2&lt;/li&gt;
    &lt;/ul&gt;
    &lt;div class="content"&gt;
      Content 1
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But I don't know how to access the child elements of <code>tab-box</code> from within the <code>tab-box</code> directive. I need this to get the child element that has the attribute <code>access="true"</code> and get the child's inner HTML to display it in the <code>&lt;div class="content"&gt;</code> element.</p>
  
  <p>How to realize that?
  Am I working against the Angular philosophy?</p>
  
  <p>Thanks! Malte</p>