title: Angular display message if list is empty
body: <p>I'm displaying subwebs that the current user has access to, in a sharepoint app part. </p>
  
  <p>I've managed to hide or show a message saying "There is no sites avaiable for you" if my app.js returns 0 in the scope.array.</p>
  
  <p>BUT, the message is displaying before the list has finished loading and when the list has loaded the message dissapears. How can I fix that?</p>
  
  <p>I have a ng-repeat in a table with textbox for filtering:</p>
  
  <pre><code>&lt;input type="text" ng-model="text" placeholder="Filter..." /&gt;
  
  &lt;div ng-controller="MainCtrl"&gt;
      &lt;table&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      Site
                  &lt;/th&gt;
                  &lt;th&gt;
                      Created
                  &lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody ng-repeat="site in sites | filter:text"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                    {{site.title}}
                  &lt;/td&gt;
                  &lt;td&gt;
                    {{site.created | date:dateFormat}}
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;div ng-show="!(sites| filter:text).length"&gt;There is no sites avaiable for you.&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I understand that the ng-show is outside the table where ng-repeat is executed, but I've tried inserting the ng-show div inside the tbody but then if no sites exist the table is never executed.</p>
  
  <p>Also, how can I disable the filter textbox if the array is empty? Tried the same attributes as ng-show but in ng-disabled, but that doesnt work.</p>