AngularJS过滤器
来源:互联网 发布:部落冲突升级兵种数据 编辑:程序博客网 时间:2024/06/05 09:11
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="../js/angular.js"></script>
<script type="text/javascript">
var app = angular.module("myApp",[]);
app.controller("myCtrl",function($scope){
$scope.money=100;
var date = new Date();
$scope.date = date;
$scope.num = 123.56;
$scope.user = [9,5,8,3,2,0,7,4];
});
</script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<p>货币过滤器: {{money | currency:"¥"}}</p>
<p>大写过滤器:{{"hello" | uppercase}}</p>
<p>小写过滤器:{{"HELLO" | lowercase}}</p>
<p>日期过滤器:{{date | date:"yyyy-MM-dd"}}</p>
<p>限制过滤器:{{num | limitTo:-3}}</p>
<p>默认排序(升序):{{user | orderBy}}</p>
<p>降序排序:{{user | orderBy:"-"}}</p>
<p>按属性值排序:{{user | orderBy:"-name" }}</p>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="../js/angular.js"></script>
<script type="text/javascript">
var app = angular.module("myApp",[]);
app.controller("myCtrl",function($scope){
$scope.money=100;
var date = new Date();
$scope.date = date;
$scope.num = 123.56;
$scope.user = [9,5,8,3,2,0,7,4];
});
</script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<p>货币过滤器: {{money | currency:"¥"}}</p>
<p>大写过滤器:{{"hello" | uppercase}}</p>
<p>小写过滤器:{{"HELLO" | lowercase}}</p>
<p>日期过滤器:{{date | date:"yyyy-MM-dd"}}</p>
<p>限制过滤器:{{num | limitTo:-3}}</p>
<p>默认排序(升序):{{user | orderBy}}</p>
<p>降序排序:{{user | orderBy:"-"}}</p>
<p>按属性值排序:{{user | orderBy:"-name" }}</p>
</body>
</html>
阅读全文
0 0
- angularjs 过滤器
- AngularJs 过滤器
- AngularJS--过滤器
- AngularJs过滤器
- AngularJS 过滤器
- AngularJS 过滤器
- AngularJs 过滤器
- AngularJS 过滤器
- AngularJS 过滤器
- AngularJS 过滤器
- angularjs-过滤器
- AngularJS 过滤器
- AngularJs过滤器
- angularJS 过滤器
- AngularJS 过滤器
- angularjs过滤器
- angularJS 过滤器
- AngularJS 过滤器
- BP与梯度下降的关系
- c语言详解sizeof
- PHP实现页面静态化——全部纯静态化
- 关于IDEA下出现Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile 的解决方法
- CountDownLatch、CyclicBarrier和Semaphore
- AngularJS过滤器
- 2017NOIP普及组 赛前心得
- 将h264和aac码流合成flv文件
- es聚合
- web前端小白练习特效:爱新鲜抽屉式banner
- 常用 权限 和 依赖
- MySQL case when then else end 用法
- 刚学了链表的生成,遍历,释放,自己将链表的定义给自我解释了一下,也将老师的模板给注释了一下,不知道自己理解的是否正确,求大神指教
- ACM准备之路(蓝桥杯6)查找