title: AngularJS input ng-model not updating
body: <p>I am trying to create a simple pagination directive with an isolated scope.  For some reason when I manually change the value it gets a bit finnicky.  Here is my problem:</p>
  
  <p>When I page forward and backward, it works great. Awesome</p>
  
  <p>When I enter a page into the field it works. Great</p>
  
  <p>However, if I enter a page into the field and then try to go forward and backward, the ng-model seems to break after I enter a page into the field.  I had it working when I did not isolate my scope but I am confused as to why it would break it. Here is my code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;paginate go-to-page="goToPage(page)" total-pages="results.hits.pages" total-hits="results.hits.total"&gt;&lt;/paginate&gt;
  </code></pre>
  
  <p>Directive:</p>
  
  <pre><code>'use strict';
  
  angular.module('facet.directives')
      .directive('paginate', function(){
          return {
              restrict: 'E',
              template: '&lt;div class="pull-right" ng-if="(totalPages !== undefined) &amp;&amp; (totalPages &gt; 0)"&gt;'+
                  '&lt;span class="left-caret hoverable" ng-click="changePage(current-1)" ng-show="current &gt; 1"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;Page'+
                  '&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="number" ng-model="current" class="pagination-input" ng-keypress="enterPage($event)"/&gt; of'+
                  '&amp;nbsp;&amp;nbsp;&amp;nbsp;{{totalPages}}&amp;nbsp;&amp;nbsp;'+
                  '&lt;span class="right-caret hoverable" ng-click="changePage(current+1)" ng-show="current &lt; totalPages"&gt;&lt;/span&gt;'+
              '&lt;/div&gt;',
              scope: {
                  goToPage: '&amp;',
                  totalPages: '=',
                  totalHits: '='
              },
              link: function(scope) {
                  scope.current = 1;
                  scope.changePage = function(page) {
                      scope.current = page;
                      window.scrollTo(0,0);
                      scope.goToPage({page:page});
                  };
                  scope.enterPage = function(event) {
                      if(event.keyCode == 13) {
                          scope.changePage(scope.current);
                      }
                  }
              }
          }
      });
  </code></pre>
  
  <p>What am I doing wrong?</p>