I downloaded a jq plug-in online, and the input box is bound to the click event, but the angular script I wrote myself also uses ng-keydown on the same input box. . . I thought Angular's keydown processing function would be executed, but it didn't work. . . But I can't remove the click event handler of the plug-in because its function needs to be used. . . Don’t know how to deal with this situation
<body ng-app="myApp" ng-controller="MyController">
angular.module('myApp',[])
</script>
</body>
</html>
The keyup event I just wrote today, keydown is similar
You can’t write it like this,
The first choice is require: '?ngModel',
Then get the value of the text box ngModel.$modelValue instead of input.value,
There is also no need for elements [0], element represents
jquery The thinking is too serious. . .