title: AngularJs Ng-Keypress event working wrongly?
body: <p>I am developing an application in Angularjs. I am using ng-keypress event in input type=text. While typing value in text I'm getting wrong values in the keypress function. For example, the first time if I type "1" I am getting <code>undefined</code>. Second time, typing any other value gives the first value</p>
  
  <p><code>&lt;input ng-model="NodeId_1" type="text" ng-keypress="getValue()"/&gt;</code></p>
  
  <pre><code> var angularapp = angular.module('nameapp', []);
  
      angularapp.controller('NameCtrl', function ($scope) {
          $scope.getValue = function () {
              alert($scope.NodeId_1);//Here first time undefined is coming and second what ever we enter first value will come
          }
      }
   )
  </code></pre>