title: Ng-Show if filtered search is not empty?
body: <p>I'm currently in the process of creating a live search for my TV Shows web app. Everything is working fine. What I would like though is, if the filtered search is empty, to not display the <code>&lt;div&gt;</code> My current implementation isn't working though...</p>
  
  <p>Also I would like for it to display something like <code>Please typ to search</code> if a user doesn't enter anything...</p>
  
  <pre><code>&lt;div ng-controller="SearchController"&gt;
  
      &lt;div ng-show='shows.length &gt; 0'&gt;
  
          &lt;h3&gt;Shows you've seen:&lt;/h3&gt;
  
          &lt;hr&gt;
  
          &lt;ul&gt;
  
              &lt;li ng-repeat="show in shows | filter: searchbar"&gt;
  
                  {{ show.name }}
                  &lt;img alt="{{ show.name }}" src="img/artwork/{{ show.image_name }}.png" style="width:50px;height:50px;"&gt;
  
              &lt;/li&gt;
  
          &lt;/ul&gt;
  
          &lt;hr&gt;
  
      &lt;/div&gt;
  
      &lt;div ng-show='allshows.length &gt; 0'&gt;
  
          &lt;h3&gt;All TV Shows:&lt;/h3&gt;
  
          &lt;hr&gt;
  
          &lt;ul&gt;
  
              &lt;li ng-repeat="allshow in allshows | filter: searchbar"&gt;
  
                  {{ allshow.name }}
                  &lt;img alt="{{ allshow.name }}" src="img/artwork/{{ allshow.image_name }}.png" style="width:50px;height:50px;"&gt;
  
              &lt;/li&gt;
  
          &lt;/ul&gt;
  
          &lt;hr&gt;
  
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>====================
  After some of the answers, this is what I created from them. Works great now!</p>
  
  <pre><code>&lt;div ng-controller="SearchController"&gt;
  
      &lt;div ng-hide='searchbar'&gt;
  
          &lt;h3&gt;Please search something&lt;/h3&gt;
  
      &lt;/div&gt;
  
      &lt;div ng-show='searchbar'&gt;
  
          &lt;div ng-show="(filtered = (shows | filter:searchbar)).length &gt; 0"&gt; 
  
              &lt;h3&gt;Shows you've seen:&lt;/h3&gt;
  
              &lt;hr&gt;
  
              &lt;ul&gt;
  
                  &lt;li ng-repeat="show in filtered"&gt;
  
                      {{ show.name }}
                      &lt;img alt="{{ show.name }}" src="img/artwork/{{ show.image_name }}.png" style="width:50px;height:50px;"&gt;
  
                  &lt;/li&gt;
  
              &lt;/ul&gt;
  
              &lt;hr&gt;
  
          &lt;/div&gt;
  
           &lt;div ng-show="(allfiltered = (allshows | filter:searchbar)).length &gt; 0"&gt;
  
              &lt;h3&gt;All TV Shows:&lt;/h3&gt;
  
              &lt;hr&gt;
  
              &lt;ul&gt;
  
                  &lt;li ng-repeat="allshow in allfiltered"&gt;
  
                      {{ allshow.name }}
                      &lt;img alt="{{ allshow.name }}" src="img/artwork/{{ allshow.image_name }}.png" style="width:50px;height:50px;"&gt;
  
                  &lt;/li&gt;
  
              &lt;/ul&gt;
  
              &lt;hr&gt;
  
          &lt;/div&gt;
  
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>