Submit form on pressing Enter with AngularJS
问题 In this particular case, what options do I have to make these inputs call a function when I press Enter? // HTML view // <form> <input type=\"text\" ng-model=\"name\" <!-- Press ENTER and call myFunc --> /> <br /> <input type=\"text\" ng-model=\"email\" <!-- Press ENTER and call myFunc --> /> </form> // Controller // .controller(\'mycontroller\', [\'$scope\',function($scope) { $scope.name = \'\'; $scope.email = \'\'; // Function to be called when pressing ENTER $scope.myFunc = function() {