I'm trying to figure out a good way in Angular to run a function by hitting enter from an input in a form. I found this on a stackoverflow post:
$(".input1").keyup(function (e) {
if (e.keyCode == 13) {
// Do something
}
});
but I'm wondering if there is a better way to do it.