11
使用AngularJS按Enter提交表单
在这种情况下,按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 …