title: ng-table : Clear table contents on button click
body: <p>I am able to show data on button click. How to clear table contents on clear?</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code> &lt;div ng-app="myApp"&gt;
    &lt;div ng-controller="tableControl as vm"&gt;
      &lt;button class="btn btn-default" ng-click="vm.show()"&gt;Show&lt;/button&gt;
      &lt;button class="btn btn-default" ng-click="vm.clear()"&gt;Clear&lt;/button&gt;
      &lt;table ng-table="vm.tableParams" class="table" show-filter="true"&gt;
        &lt;tr ng-repeat="user in $data"&gt;
          &lt;td title="'Name'" filter="{ name: 'text'}" sortable="'name'"&gt;
            {{user.name}}&lt;/td&gt;
          &lt;td title="'Age'" filter="{ age: 'number'}" sortable="'age'"&gt;
            {{user.age}}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Tried setting <em>tableParams</em> to null but did not help.</p>
  
  <pre><code>  self.show = function() {
      self.tableParams = new NgTableParams({
        page: 1, // show first page
        count: 10 // count per page
      }, {
        dataset: data
      });
    }
  
    self.clear = function() {
    self.tableParams = null;
    }
  </code></pre>
  
  <p>Here is the <a href="https://jsfiddle.net/santushet/p71w5u2k/" rel="nofollow noreferrer">fiddle</a></p>