AngularJS Tutorial - upper-case filter








We can use uppercase filter to to upper-case the name.

We add | as a separator between the data binding statement and filter.

Example


<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">
</script><!--  w w w . ja va 2s.c  om-->
</head>
<body>
    <div data-ng-init="names=['XML','CSS','HTML','Javascript']">
        <ul>
            <li data-ng-repeat="name in names">{{name | uppercase}}</li>
        </ul>
    </div>
</body>
</html>

The code above is rendered as follows: