Angularjs lowercase example


Angularjs lowercase example : It converts the string in lowercase


Angularjs lowercase Example & Syntax

In Html Template

{{ expression | lowercase}}

In JavaScript

$filter('lowercase')();

Lowercase Example

<!DOCTYPE html>
<html lang="en">
<head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
</head>

<body>
<div ng-app="" ng-init="myData=[{name:'John',city:'New York'},
                                      {name:'Mike',city:'Florida'},
                                      {name:'Minni',city:'London'},
                                      {name:'Sefali',city:'Sydney'},
                                      {name:'Maya',city:'Peris'},
                                      {name:'Kelly',city:'Beijing'}]">
    <table id="searchResults">
    <tr><th>Name</th><th>City</th></tr>
    <tr ng-repeat="data in myData">
    <td>{{data.name | lowercase}}</td>
    <td>{{data.city | lowercase}}</td>
    </tr>
    </table>

</div>

</body>
</html>

Try it »

Angularjs lowercase example

Angularjs lowercase example


Advertisements

Add Comment

📖 Read More