Thursday , August 24 2017
Home / angularjs / AngularJs lowercase Filter Example

AngularJs lowercase Filter Example

AngularJs lowercase filer is used to convert the uppercase string to lowercase string.

AngularJs lowercase :


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Angular Filter Example</title>
<script
    src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script type="text/javascript">
    var app = angular.module("myApp", []);
    app.controller("employeeCotroller", function($scope) {
        $scope.employees = [ {
            empId : 1001,
            empName : "CHANDRA SHEKHAR",
        }, {
            empId : 1002,
            empName : "SCOTT",
        }, {
            empId : 1003,
            empName : "MARK",
        } ]

    })
</script>
</head>
<body ng-app="myApp">
    <h1>Employees List</h1>
    <table ng-controller="employeeCotroller" border="2">
        <tr style="background-color: green">
            <td>Employee Id</td>
            <td>Employee Name</td>
        </tr>
        <tr ng-repeat="employee in employees">
            <td>{{employee.empId}}</td>
            <td>{{employee.empName | lowercase}}</td>
        </tr>
    </table>
</body>
</html>

On the above example, we have converted the employees name into lowercase. You can see the output like that.

Output :

Employees List

Employee Id Employee Name
1001 chandra shekhar
1002 scott
1003 mark

About chandrashekhar

Hi Folks, you have reach this so far, that shows you like what you are learning. Then why don't you support us to improve for bettor tutorials by leaving your valuable comments and why not you keep in touch with us for latest updates on your favorite blog @ facebook , twitter , Or Google+ ,

Recommended

AngularJs Data Binding Example

One of the important feature of AngularJs is Data Binding. Data binding makes the AngularJs …

Leave a Reply

Your email address will not be published. Required fields are marked *