Home > Web Front-end > JS Tutorial > Angular filter makes data case conversion

Angular filter makes data case conversion

php中世界最好的语言
Release: 2018-06-13 11:26:20
Original
1543 people have browsed it

This time I will bring you the Angular filter to convert data to upper and lower case. What are the precautions for the Angular filter to make data case conversion? The following is a practical case, let's take a look.

<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="UTF-8">
<title>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>
Copy after login

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

JS gets all parameter values ​​​​of url

How to customize the operation login form code of Vue.js

The above is the detailed content of Angular filter makes data case conversion. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template