AngularJs lowercase filer is used to convert the uppercase string to lowercase string.
AngularJs lowercase :
[html]
<!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>
[/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 |