is there a way to trigger event when clicking on ENTER key in the input field? I found a directive that someone suggested to use, but I wonder if there is a simple way to do it.
I am using angular 1.3.
is there a way to trigger event when clicking on ENTER key in the input field? I found a directive that someone suggested to use, but I wonder if there is a simple way to do it.
I am using angular 1.3.
$timeout(function() {
angular.element('#myselector').trigger('click');
}, 100);
If you want trigger on press on enter
key you need to write like that
<input ng-keyup="$event.keyCode == 13 ? myFunc() : null">