Ng-Keyup-6

 

When we type in textbox ng-keyup event will call the lUpperCase(text) function which convert the uppercase character to lowercase.Text is a variable to which textbox is bind.

 
 
 
<!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="clickExample"> <div ng-controller="ExampleController"> Lower Case: <input type="text" ng-model="text" ng-keyup="UpperCase(text)" /><br /> </div> <script> var app = angular.module("clickExample", []); app.controller('ExampleController', ['$scope', function ($scope) { $scope.UpperCase = function (txt) { $scope.text = txt.toLocaleUpperCase(); } }]); </script> </body> </html>
Output