title: AngularJS navigation with key events
body: <p>I am trying to create navigation via key events between entries. Left and right keys to move towards either end. It works similarly to this <a href="http://jsfiddle.net/rjTxB/" rel="nofollow">JsFiddle</a> i modified from someone although in the actual one each entry would have its own links to the previous and next one. </p>
  
  <pre><code>angular.element($document).bind("keyup", function(event) {
    if (event.which === 37) {
      $scope.$apply(function() {
        $location.path("/Book/Moby");
      });
    } else if (event.which === 39) {
      $scope.$apply(function() {
        $location.path("/Book/Gatsby");
      });
    }
  });
  </code></pre>
  
  <p>It seems to work fine in the JsFiddle but if you look at the console and see the amount of events fired from left and right keyups it will seriously slow down navigation. Each one of those events will run $location.path.</p>
  
  <p>Any advice on how to listen to an event only once or flush old events would be great</p>