latest Post

Explain Convert Text To Uppercase Using AngularJS.

AngularJS provides a feature for converting all the letters of text into uppercase letters. I will explain this feature by creating a sample application.

First of all you need to add an external Angular.js file to your application, in other words "angular.min.js".For this you can go to the AngularJS official site. After downloading the external file you need to add this file to the Head section of your application.

The complete code of this application is as follows

    <html ng-app xmlns="http://www.w3.org/1999/xhtml">
   
    <head runat="server">
        <title></title>
        <script src="angular.min.js"></script>
        <script>
            function x($scope) {
                $scope.test = "this text will be displayed in Uppercase";
            }
        </script>
    </head>
   
    <body>
        <form id="form1" runat="server">
            <div ng-controller="x">
                Without Uppercase:-
                <p>{{test}}</p>
                <br /> With Uppercase:-
                <p>{{test|uppercase}}</p>
            </div>
        </form>
    </body>
   
    </html>  

About Mallikarjun A

Mallikarjun A
Recommended Posts × +

0 comments:

Post a Comment