title: Angular pagination control page number to show
body: <p>I am using angular pagination in which if the page are too much then its showing pagination like google logic.</p>
  
  <p>Here is the screenshot for the same</p>
  
  <p><a href="https://i.stack.imgur.com/GKeIv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GKeIv.png" alt="enter image description here"></a></p>
  
  <p>I want to restric the width of the pagination so i need to remove some extra numbers to show so is there any way to remove some pages like its showing 7 pages in start can i restrict it to 3 pages.</p>
  
  <p>This is my complete code</p>
  
  <p><strong>Pagination HTML</strong></p>
  
  <pre><code>&lt;div class="paginationCont"&gt;
      &lt;dir-pagination-controls boundary-links="true" on-page-change="pageChangeHandler(newPageNumber)" template-url="templates/pagination_ctrls.html"&gt;&lt;/dir-pagination-controls&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Printing rows</strong></p>
  
  <pre><code>&lt;tr ng-hide="transStatus=='inactive'" dir-paginate="item in transactions | filter: transSearch | itemsPerPage: pageSize" current-page="currentPage"&gt;
      &lt;td&gt;&lt;div class="checkbox"&gt;&lt;label&gt;&lt;input type="checkbox" ng-checked="allCheck"&gt; {{item.txn_id}}&lt;/label&gt;&lt;/div&gt;&lt;/td&gt;
       &lt;td&gt;{{item.name}}&lt;/td&gt;
       &lt;td&gt;{{item.datetime | date:'yyyy-MM-dd HH:mm:ss'}}&lt;/td&gt;
      &lt;td&gt;{{item.amount}}&lt;/td&gt;
      &lt;td&gt;{{item.client_cut}}&lt;/td&gt;
      &lt;td ng-switch="item.status"&gt;&lt;span ng-switch-when="1"&gt;Active&lt;/span&gt;&lt;span ng-switch-when="0"&gt;Inactive&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>