I'm already detecting when the user presses enter on input , but how can I capture the text that he typed?
HTML
<div ng-app="Insidetv" ng-controller="ListaController">
@foreach($listas as $lista)
<input value="{{ $lista->descricao }}" type="text" name="descricao" ng-keypress="editName($event)">
@endforeach
</div>
JS
angular.module('Insidetv')
.controller('ListaController', function($scope, $http) {
$scope.editName = function($event){
var keyCode = $event.which || $event.keyCode;
if(keyCode === 13) {
console.log($event);
}
};
});