AngularJS uppercase filter

Definition och användning

uppercase Filter konverterar strängar till stor bokstav.

Relaterade sidor

AngularJS教程:Angular filter

Exempel

Visa text i stor bokstav:

<div ng-app="myApp" ng-controller="caseCtrl">
<h1>{{txt | uppercase}}</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('caseCtrl', function($scope) {
    $scope.txt = "Hello World!";
});
</script>

Prova själv

Syntax

{{ string | uppercase}}