Home  >  Article  >  Web Front-end  >  Angular uses filter uppercase/lowercase to implement letter case conversion function example

Angular uses filter uppercase/lowercase to implement letter case conversion function example

亚连
亚连Original
2018-05-28 17:12:062211browse

This article mainly introduces Angular's use of filters uppercase/lowercase to realize letter case conversion function, and involves simple usage skills of AngularJS filters for string conversion. Friends in need can refer to the example of this article

It describes how Angular uses the filter uppercase/lowercase to implement the letter case conversion function. Share it with everyone for your reference, the details are as follows:

<!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>

Running results:

The above is me I compiled it for everyone, I hope it will be helpful to everyone in the future.

Related articles:

How to handle when JQuery ajax returns JSON

How to solve JQuery ajaxSubmit to submit Chinese garbled characters

How to solve the problem of Chinese garbled characters when JQuery ajax returns json

The above is the detailed content of Angular uses filter uppercase/lowercase to implement letter case conversion function example. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn