title: Send scope data to custom event AngularJS
body: <p>I need an event that executes when the user press enter on the element and there is an <a href="https://stackoverflow.com/a/17472118/1874460">answer to that question already</a>. But the situation here is that the only thing that I can pass to the callback is the <code>$event</code> object but I want to pass the <code>$scope</code> data to the callback just like ng-click does:</p>
  
  <pre><code>&lt;input type="text" ng-enter="application.search(application.$hass)"/&gt;
  </code></pre>
  
  <p>And in the controller I would have:</p>
  
  <pre><code>$scope.application = {
     $hass: "444331"
  }
  
  $scope.application.search = function($hass)
  {
       alert($hass)// prints 444331
  }
  </code></pre>
  
  <p>How can I achieve it.</p>