Ng-Keyup-5

 

When we type in textbox on ng-keyup and ng-keydown event set the value of isCheckedKeyUp and isCheckedKeyDown to true which is bind to the checkboxes respectively.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app> <div> Text: <input type="text" ng-model="text" ng-keyup="isCheckedKeyUp=true" ng-keydown="isCheckedKeyDown=true" /><br /> Is KeyUp: <input type="checkbox" ng-model="isCheckedKeyUp" /><br /> Is KeyDown: <input type="checkbox" ng-model="isCheckedKeyDown" /> </div> </body> </html>
Output