Improve this Doc  View Source

uppercase

  1. - filter in module ng

Converts string to uppercase.

Usage

In HTML Template Binding

{{ uppercase_expression | uppercase}}

In JavaScript

$filter('uppercase')()

Examples

<script>
  angular.module('uppercaseFilterExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.title = 'This is a title';
    }]);
</script>
<div ng-controller="ExampleController">
  <!-- This title should be formatted normally -->
  <h1>{{title}}</h1>
  <!-- This title should be capitalized -->
  <h1>{{title | uppercase}}</h1>
</div>