I need an event that executes when the user press enter on the element and there is an answer to that question already. But the situation here is that the only thing that I can pass to the callback is the $event
object but I want to pass the $scope
data to the callback just like ng-click does:
<input type="text" ng-enter="application.search(application.$hass)"/>
And in the controller I would have:
$scope.application = {
$hass: "444331"
}
$scope.application.search = function($hass)
{
alert($hass)// prints 444331
}
How can I achieve it.