title: angular dirpagination - get current page
body: <p>I use dirpagination in my angular app to have pagination for my search results. I'm trying to create a dynamic title for the page based on search words and selected page.</p>
  
  <pre><code>&lt;h2 class="page-title"&gt;{{app.set_page_title()}} - page {{app.pagination.current}}&lt;/h2&gt;
  </code></pre>
  
  <p>The problem is I can't get the current page from dirpagination. Any idea how to do it?</p>
  
  <p>Update:</p>
  
  <pre><code>  &lt;div class="search-item"
         dir-paginate="item in app.get_results() | itemsPerPage: app.items_per_page"&gt;
      &lt;div class="item"&gt;
        Lorem ipsum item
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="pull-left pagination-controls"&gt;
      &lt;dir-pagination-controls&gt;&lt;/dir-pagination-controls&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>And this is my app structure:</p>
  
  <pre><code>angular.module('searchApp',
                 ['ngRoute','angularUtils.directives.dirPagination'])
    .controller('searchController', function($scope, $rootScope, $location) {
      var app = this;
  
      app.set_page_title = function() {
        // Set the page title
        return "Bla bla";
      }
  
    });
  </code></pre>