title: What's the exact purpose of the getData() function in ngTable
body: <p>I'm using <a href="http://ng-table.com/#/" rel="nofollow">ngTable</a> in a big project. What is the exact purpose of the getData function sent in the table params ?</p>
  
  <pre><code>vm.tableParams = new ngTableParams({
          page: 1,            // show first page
          count: 10           // count per page
      }, {
          total: data.length, // length of data
          getData: function ($defer, params) {
              $defer.resolve(data.slice((params.page() - 1) * params.count(), params.page() * params.count()));
          }
      });
  </code></pre>
  
  <p>I guess that <code>data</code> is an array of objects in my controller, and that data are not found into my DOM like dataTables does.
  I have also seen a <code>$data</code>object that make confusion.</p>
  
  <p>Bonus : Why is this <code>slice()</code> stuff needed ?</p>