Skip to content
Related Articles

Related Articles

AngularJS | angular.uppercase() Function

View Discussion
Improve Article
Save Article
  • Last Updated : 16 Apr, 2019

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.


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

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

Before Click:
After Click:

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!