title: Interaction between directives
body: <p>I have 2 directives, one that displays a list of objects, and other one that adds objects to that list.
  The problem that I have is that the list are tied to another elements list this way:</p>
  
  <p>Main code:</p>
  
  <pre><code>&lt;!--main code --&gt;
  &lt;div&gt;
      &lt;ul&gt;
          &lt;li&gt;
              &lt;element-a&gt;&lt;/element-a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;element-a&gt;&lt;/element-a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;element-a&gt;&lt;/element-a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;element-a&gt;&lt;/element-a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Element A template</p>
  
  <pre><code>&lt;!-- element-a template --&gt;
  &lt;ul&gt;
      &lt;li&gt; 
          &lt;my-element-list&gt;&lt;/my-element-list&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;my-element-list&gt;&lt;/my-element-list&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;my-element-list&gt;&lt;/my-element-list&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;my-element-list&gt;&lt;/my-element-list&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>My List Template:</p>
  
  <pre><code>&lt;!-- my-element-list template --&gt;
  &lt;button type="button" data-ng-click="addElement()"&gt;Add&lt;/button&gt;
  &lt;ul&gt;
      &lt;li&gt;
          my element data
      &lt;/li&gt;
      &lt;li&gt;
          my element data
      &lt;/li&gt;
      &lt;li&gt;
          my element data
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I'm new to angular, but I don't want to have the add directive on each list, as that would have a lot of not needed code added to the html.
  Also the add is a directive that has a template, etc, that is suppossed to show a modal dialog which will request the element data.</p>
  
  <p>Is this the correct approach for doing this?
  How can I get the add modal dialog displayed when the add button is clicked?
  I tried with <code>$broadcast</code> and <code>$emit</code>, but the add directive is not a parent/child of the element list.</p>