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

AngularJs lowercase :


<!DOCTYPE html>
<meta charset="UTF-8">
<title>Angular Filter Example</title>
<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",
        } ]

<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 ng-repeat="employee in employees">
            <td>{{employee.empName | lowercase}}</td>

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 the Author:

Founder of Love Java, Python, Shell and opensource frameworks. Follow him on twitter and facebook for latest updates.

Leave A Comment