title: How to use ng-show on a directive that has an isolated scope
body: <p>I have a directive that I use like this:</p>
  
  <pre><code>&lt;dir model="data"&gt;&lt;/dir&gt;
  </code></pre>
  
  <p>The directive has an isolated scope.</p>
  
  <pre><code>scope :{
    model:'='
  }
  </code></pre>
  
  <p>Now I'm trying to use <code>ng-show</code> on that directive using another attribute of my page's $scope, like this:</p>
  
  <pre><code>&lt;dir ng-show="show" model="data"&gt;&lt;/dir&gt;
  </code></pre>
  
  <p>But it's not working because the directive is trying to find the <code>show</code> attribute on its own scope. </p>
  
  <p>I don't want the directive to know about the fact that its container might choose to hide it.</p>
  
  <p>The workaround I found is to wrap the directive in a <code>&lt;div&gt;</code> and apply <code>ng-show</code> on that element, but I don't like the extra element this forces me to use: </p>
  
  <pre><code>&lt;div ng-show="show" &gt;
    &lt;dir model="data"&gt;&lt;/dir&gt;    
  &lt;/div&gt;
  </code></pre>
  
  <p>Is there a better way of doing this?</p>
  
  <p>See this plunker: <a href="http://plnkr.co/edit/Q3MkWfl5mHssUeh3zXiR?p=preview">http://plnkr.co/edit/Q3MkWfl5mHssUeh3zXiR?p=preview</a></p>