Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
AngularJS ng-keydown Event Example
Keywords : Angularjs ng-keydown example, Angularjs keydown function example, Angularjs ng-keydown directive example, Angularjs raise event on keydown example, Key down event example in angularjs
Example
<!DOCTYPE html> <html> <head> <title> AngularJs ng-keydown Event with Example </title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script type="text/javascript"> var app = angular.module('ngkeydownApp', []); app.controller('ngkeydownCtrl', function ($scope) { $scope.getkeys = function (event) { $scope.keyval = event.keyCode; } }); </script> </head> <body> <div ng-app="ngkeydownApp" ng-controller="ngkeydownCtrl"> <h2>AngularJS ng-keydown Event Example</h2> Enter Text: <input type="text" ng-keydown="getkeys($event)" ng-model="ftxt"><br /><br /> <span style="color:Red">Last Key Code: {{keyval}}</span> </div> </body> </html>
Click Here to See Result
Result
Previous
Next