AngularJS | angular.uppercase() Function

The angular.uppercase() Function in AngularJS is used to convert the string into uppercase. It can be used when user wants to show the text in uppercase instead of lowercase.
Syntax:

angular.uppercase(string)

Example: In this example the string is converted into uppercase.

filter_none

edit
close

play_arrow

link
brightness_4
code

<html ng-app="app">
<head>
<script src=
</script>
    <title>angular.uppercase()</title>
    </head>
    <body style="text-align:center">
     <h1 style="color:green">GeeksforGeeks</h1>
     <h2>angular.uppercase()</h2>
     <div ng-controller="geek">
     <br>
     <b>Before: </b>{{ string1 }}
     <br><br>
     <button id="myButton" ng-mousedown="upper()">Click it!
     </button>
     <br><br>
  
     <b>After: </b>{{ string2 }}
     </div>
  
     <script>
       var app = angular.module('app', []);
       app.controller('geek', function($scope) {
       $scope.obj1 = 
       "geeksforgeeks is the computer science portal for geeks."
       $scope.obj2;
       $scope.string1 = $scope.obj1;
       $scope.upper = function() {
       $scope.string2 = angular.uppercase($scope.obj1);
       }
    });
    </script>
    </body>
</html>

chevron_right


Output:
Before Click:
upper
After Click:
upper



My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.