Angularjs uppercase example
Angularjs uppercase example : It converts the string in uppercase
Syntax : Angularjs uppercase
In Html Template
{{ expression | uppercase}}
In JavaScript
$filter('uppercase')();
Uppercase 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 | uppercase}}</td> <td>{{data.city | uppercase}}</td> </tr> </table> </div> </body> </html> |
Advertisements