title: How to get incremental serial number in Angular table pagination
body: <p>I am using Angular table pagination. I have a serial number that starts from 1 for each page, but I want continuous page numbers. How to get it?</p>
  
  <pre><code>&lt;div ng-app="myApp" ng-controller="myController"&gt;
      &lt;table id="myData"&gt;
          &lt;thead&gt;
              &lt;td&gt;S.no&lt;/td&gt;
              &lt;td&gt;Name&lt;/td&gt;
              &lt;td&gt;Age&lt;/td&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr dir-paginate="data in details | itemsPerPage:3"&gt;
                  &lt;td&gt;{{$index+1}}&lt;/td&gt;
                  &lt;td&gt;{{data.name}}&lt;/td&gt;
                  &lt;td&gt;{{data.age}}&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Full code: <a href="https://jsfiddle.net/mLvLzzg7/4/" rel="nofollow noreferrer">https://jsfiddle.net/mLvLzzg7/4/</a></p>
  
  <p>If I try:</p>
  
  <pre><code>&lt;td&gt;{{itemsPerPage * (currentPage - 1) + $index + 1}}&lt;/td&gt;
  </code></pre>
  
  <p>It is returning <code>null</code>. Any suggestions?</p>