title: Ionic, Angular get input type value on keypress event
body: <p>I am try to call an event during keypress in one of the input box, but not sure how to pass the value of the input box.</p>
  
  <p>This is how i do it and getting <code>undefined</code> in the end.</p>
  
  <p><strong>controller.js</strong></p>
  
  <pre><code>$scope.bySearch = function(descr){
    var xhr = $http({
      method: 'post',
      url: 'http://mywebsite.com/api/lists.php?descr='+descr
    });
   xhr.success(function(data){
      $scope.data = data.data;
    });
    $ionicScrollDelegate.scrollTop();
    console.log(descr);
  }
  </code></pre>
  
  <p><strong>sample.html</strong></p>
  
  <pre><code>&lt;label class="item item-input"&gt;
       &lt;i class="icon ion-search placeholder-icon"&gt;&lt;/i&gt;
       &lt;input type="text" ng-model="dash.search" placeholder="Search" ng-keypress="bySearch(dash.search)"&gt;
  &lt;/label&gt;
  </code></pre>
  
  <p>What is the correct way to pass the data to angular?</p>