docs(filter/uppercase): add an example

I saw that the uppercase filter had no example so I decided to add a minimal example to explain how the uppercase filter works.

Thank you very much to @narretz for helping me through this process.

Closes #15885
This commit is contained in:
Eli Sadoff
2017-04-07 15:23:19 +00:00
committed by Martin Staffa
parent 6ee7c29ca7
commit e812b9fa9e
+20 -1
View File
@@ -698,6 +698,9 @@ function jsonFilter() {
* @kind function
* @description
* Converts string to lowercase.
*
* See the {@link ng.uppercase uppercase filter documentation} for a functionally identical example.
*
* @see angular.lowercase
*/
var lowercaseFilter = valueFn(lowercase);
@@ -709,6 +712,22 @@ var lowercaseFilter = valueFn(lowercase);
* @kind function
* @description
* Converts string to uppercase.
* @see angular.uppercase
* @example
<example module="uppercaseFilterExample" name="filter-uppercase">
<file name="index.html">
<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>
</file>
</example>
*/
var uppercaseFilter = valueFn(uppercase);