angular.uppercase()
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>angular.uppercase</title> </head> <body ng-app="uppercaseExample"> <h1>angular.uppercase</h1> <p> <span>描述:</span><br /> <span>将指定的字符串转换为大写</span> </p> <p> <span>使用方法:</span><br /> <span>angular.uppercase(string)</span> </p> <p> <span>参数:</span><br /> <span>string:要转换的字符串</span><br /> </p> <p> <span>返回值:</span><br /> <span>大写的string</span> </p> <hr /> <div ng-controller="uppercasecon"> <pre id="test">{{vals}}</pre> </div> </body> <script src="../../js/angular.1.3.0.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> angular.module('uppercaseExample', []).controller('uppercasecon', ['$scope', function($scope) { var obj = { name: '张三', age: '18岁' } $scope.vals = angular.uppercase(angular.toJson(obj)); }]) </script> </html>