本文实例讲述了Angular使用过滤器uppercase/lowercase实现字母大小写转换功能。分享给大家供大家参考,具体如下:
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="UTF-8">
<title>www.jb51.net angular过滤器uppercase/lowercase字母大小写转换</title>
<script src="angular.min.js"></script>
</head>
<body ng-controller="my">
<span ng-bind="name"></span>
<span ng-bind="name | uppercase"></span> 输出大写
<span ng-bind="name |lowercase"></span>输出小写
</body>
<script type="text/javascript">
var app=angular.module("myApp",[]);
app.controller("my",["$scope",function($scope){
$scope.name="Jaay";
}])
</script>
</html>
运行结果:
PS:这里再为大家推荐几款相似的在线工具供大家参考:
在线字母大小写转换工具:http://tools.jb51.net/transcoding/upper
人民币大写在线转换工具:http://tools.jb51.net/zhuanhuanqi/rmbupper
更多关于AngularJS相关内容感兴趣的读者可查看本站专题:《AngularJS指令操作技巧总结》、《AngularJS入门与进阶教程》及《AngularJS MVC架构总结》
希望本文所述对大家AngularJS程序设计有所帮助。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。