title: show table in angularjs if table has row
body: <p>I am creating a web based app in mvc5 angularjs in which i have a table</p>
  
  <pre><code>&lt;div class="table-responsive scroll" ng-hide="hidetable"&gt;
      &lt;table id="table" class="table table-bordered table-condensed"&gt;
           &lt;thead&gt;
                &lt;tr class="bg-primary"&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('date')"&gt;Date&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('day')"&gt;Day&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('brandname')"&gt;BrandName&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('zone')"&gt;Zone&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('location')"&gt;Location&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('area')"&gt;Area&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('trainer')"&gt;TrainerName&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('program')"&gt;Program&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('trainingno')"&gt;Training Id&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('amount')"&gt;Amount&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a"&gt;Remark&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" ng-click="order('sonvinid')"&gt;SonvinId&lt;/a&gt;&lt;/th&gt;
                    &lt;th&gt;&lt;a href="#" class="erp-tb-a" &gt;&lt;/a&gt;Add&lt;/th&gt;
                &lt;/tr&gt;
                &lt;tr class="bg-primary"&gt;
                    &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.date" /&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.day" /&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.brandname" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.zone" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.location" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.area" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.trainer" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.program" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.trainingno" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.amount" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;input type="text" class="erp-input" ng-model="search.sonvinid" /&gt;&lt;/td&gt;
                     &lt;td&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
                &lt;tr ng-repeat="p in getallcompany | orderBy:predicate:reverse | filter:search"&gt;
                    &lt;td&gt;{{p.date}}&lt;/td&gt;
                    &lt;td&gt;{{p.day}}&lt;/td&gt;
                    &lt;td&gt;{{p.brandname}}&lt;/td&gt;
                    &lt;td&gt;{{p.zone}}&lt;/td&gt;
                    &lt;td&gt;{{p.location}}&lt;/td&gt;
                    &lt;td&gt;{{p.area}}&lt;/td&gt;
                    &lt;td&gt;{{p.trainer}}&lt;/td&gt;
                    &lt;td&gt;{{p.program}}&lt;/td&gt;
                    &lt;td&gt;{{p.trainingno}}&lt;/td&gt;
                    &lt;td&gt;{{p.amount}}&lt;/td&gt;
                    &lt;td&gt;&lt;input type="text" class="erp-input" style="width:90%; border:1px solid black;" ng-model="mdremarks" /&gt;&lt;/td&gt;
                    &lt;td&gt;{{p.sonvinid}}&lt;/td&gt;
                    &lt;td&gt;&lt;md-checkbox tabindex="0" area-label="none" role="checkbox" ng-click="clickcheckbox()"&gt;&lt;/md-checkbox&gt;&lt;/td&gt;
                 &lt;/tr&gt;
             &lt;/tbody&gt;
    &lt;/table&gt;
    &lt;div style="margin-bottom:20px"&gt;
         &lt;a href="#" style="cursor:pointer;" class="btn btn-primary active"&gt;Generate Bill&lt;/a&gt;
         &lt;a href="#" style="cursor:pointer;" class="btn btn-warning active"&gt;Back&lt;/a&gt;
     &lt;/div&gt;
  
  
  &lt;/div&gt;
  </code></pre>
  
  <p>this is my table and on my first div i used </p>
  
  <pre><code>ng-hide="hidetable"
  </code></pre>
  
  <p>now what i want is if the table is empty(i.e) if the value which is returning from sql has no rows, the table should be hide and if the returning value has rows the table should be shown </p>
  
  <pre><code>var app = angular.module('myapp', ['ngMaterial']);
  app.controller('mycontroller', function ($scope, $http) {
              $scope.hidetable = true;
  </code></pre>
  
  <p>this is my controller and table will be hide on page load</p>
  
  <pre><code>$http.get('/freezeservice.asmx/gettabledetails', {
                  params: {
                      log: log,
                      pm: pm,
                      comname: $scope.mdcompany,
                      mm: $scope.datemm,
                      yy: $scope.dateyy
                  }
              })
                  .then(function (response) {
                      {
                          $scope.getallcompany = response.data.info;
  
                      }
                  });
  </code></pre>
  
  <p>this is how i am fetching my data</p>
  
  <p>need your help</p>