title: angularjs pagination using smart table
body: <p>By using angular smart table, how do i get the result set by using offset value.
  For example, I have 100 records in the database</p>
  
  <ol>
  <li>First i need to get 20 records from database and to display only 10 items per page.</li>
  <li>After clicking the 3rd page, need to query the database(service call) and get the another 20 records..etc(but no server call for 2nd page)</li>
  </ol>
  
  <p>I am using smart table pipe/ajax plugin to display the records.</p>
  
  <p>How to achieve using this.</p>
  
  <pre><code>&lt;div class="table-container" ng-controller="pipeCtrl as mc"&gt;
              &lt;table class="table" st-pipe="mc.callServer" st-table="mc.displayed"&gt;
                  &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th st-sort="id"&gt;id&lt;/th&gt;
                      &lt;th st-sort-default="reverse" st-sort="name"&gt;name&lt;/th&gt;
                      &lt;th st-sort="age"&gt;age&lt;/th&gt;
                      &lt;th st-sort="saved"&gt;saved people&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;th&gt;&lt;input st-search="id"/&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;input st-search="name"/&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;input st-search="age"/&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;input st-search="saved"/&gt;&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody ng-show="!mc.isLoading"&gt;
                  &lt;tr ng-repeat="row in mc.displayed"&gt;
                      &lt;td&gt;{{row.id}}&lt;/td&gt;
                      &lt;td&gt;{{row.name}}&lt;/td&gt;
                      &lt;td&gt;{{row.age}}&lt;/td&gt;
                      &lt;td&gt;{{row.saved}}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;/tbody&gt;
                  &lt;tbody ng-show="mc.isLoading"&gt;
                  &lt;tr&gt;
                      &lt;td colspan="4" class="text-center"&gt;&lt;div class="loading-indicator"&gt;&lt;/div&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;/tbody&gt;
                  &lt;tfoot&gt;
                  &lt;tr&gt;
                      &lt;td class="text-center" st-pagination="" st-items-by-page="5" colspan="4"&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;/tfoot&gt;
              &lt;/table&gt;
          &lt;/div&gt; 
  </code></pre>
  
  <p><a href="http://lorenzofox3.github.io/smart-table-website/" rel="nofollow">http://lorenzofox3.github.io/smart-table-website/</a></p>
  
  <p>code in the Plunker</p>
  
  <p><a href="http://plnkr.co/edit/wzUHcc9PBF6tzH8iAEsn?p=preview" rel="nofollow">http://plnkr.co/edit/wzUHcc9PBF6tzH8iAEsn?p=preview</a></p>