html部分
.............................................................
AngularJS Filters过滤器基本用法
数字:{{123.456789|number:3}}
货币:{{123.456789|currency:"$"}}
日期:{{currentDate | date:'yyyy-MM-dd HH:mm:ss Z'}}
JSON:{{JSONObj | json}}
Limit Array:{{days|limitTo:3}}
Limit String:{{word | limitTo:9}}
Uppercase:{{word|uppercase|limitTo:9}}
Lowercase:{{word|lowercase|limitTo:9}}
JS部分
.............................................................
var myApp=angular.module('myApp',[]);
myApp.controller('myController',function ($scope) {
$scope.currentDate=new Date();
$scope.JSONObj={title:'hahhahaha'};
$scope.days=['Mon','Tue','Wed','Thr','Fri','Sat','Sun'];
$scope.word='addsAdGaDADFAsDfdsafdsafasdf';
})