标签:
<span style="font-size:18px;">{{ today | date:'medium' }} <!-- Aug 09, 2013 12:09:02 PM --> {{ today | date:'short' }} <!-- 8/9/1312:09PM --> {{ today | date:'fullDate' }} <!-- Thursday, August 09, 2013 --> {{ today | date:'longDate' }} <!-- August 09, 2013 --> {{ today | date:'mediumDate' }}<!-- Aug 09, 2013 --> {{ today | date:'shortDate' }} <!-- 8/9/13 --> {{ today | date:'mediumTime' }}<!-- 12:09:02 PM --> {{ today | date:'shortTime' }} <!-- 12:09 PM --></span>
<span style="font-size:18px;">四位年份:{{ today | date:'yyyy' }} <!-- 2013 --> 两位年份:{{ today | date:'yy' }} <!-- 13 --> 一位年份:{{ today | date:'y' }} <!-- 2013 --></span>
<span style="font-size:18px;">英文月份:{{ today | date:'MMMM' }} <!-- August --> 英文月份简写:{{ today | date:'MMM' }} <!-- Aug --> 数字月份:{{ today |date:'MM' }} <!-- 08 --> 一年中的第几个月份:{{ today |date:'M' }} <!-- 8 --></span>
<span style="font-size:18px;">数字日期:{{ today|date:'dd' }} <!-- 09 --> 一个月中的第几天:{{ today | date:'d' }} <!-- 9 --> 英文星期:{{ today | date:'EEEE' }} <!-- Thursday --> 英文星期简写:{{ today | date:'EEE' }} <!-- Thu --></span>
<span style="font-size:18px;">24小时制数字小时:{{today|date:'HH'}} <!--00--> 一天中的第几个小时:{{today|date:'H'}} <!--0--> 12小时制数字小时:{{today|date:'hh'}} <!--12--> 上午或下午的第几个小时:{{today|date:'h'}} <!--12--></span>
<span style="font-size:18px;">数字分钟数:{{ today | date:'mm' }} <!-- 09 --> 一个小时中的第几分钟:{{ today | date:'m' }} <!-- 9 --></span>
<span style="font-size:18px;">数字秒数:{{ today | date:'ss' }} <!-- 02 --> 一分钟内的第几秒:{{ today | date:'s' }} <!-- 2 --> 毫秒数:{{ today | date:'.sss' }} <!-- .995 --></span>
<span style="font-size:18px;">上下午标识:{{ today | date:'a' }} <!-- AM --> 四位时区标识:{{ today | date:'Z' }} <!--- 0700 --></span>
<span style="font-size:18px;">{{ ['Ari','Lerner','Likes','To','Eat','Pizza'] | filter:'e' }} <!-- ["Lerner","Likes","Eat"] --> {{ [{ 'name': 'Ari', 'City': 'San Francisco', 'favorite food': 'Pizza' },{ 'name': 'Nate', 'City': 'San Francisco', 'favorite food': 'indian food' }] | filter:{'favorite food': 'Pizza'} }} <!-- [{"name":"Ari","City":"SanFrancisco","favoritefood":"Pizza"}] --></span>
<span style="font-size:18px;">{{ {'name': 'Ari', 'City': 'SanFrancisco'} | json }} <!-- { "name": "Ari", "City": "San Francisco" } --></span>
<span style="font-size:18px;">{{ San Francisco is very cloudy | limitTo:3 }} <!-- San --></span>
<span style="font-size:18px;">{{ San Francisco is very cloudy | limitTo:-6 }} <!-- cloudy --></span>
<span style="font-size:18px;"> </span>
<span style="font-size:18px;">{{ "San Francisco is very cloudy" | lowercase }} <!-- san francisco is very cloudy --> </span>
<span style="font-size:18px;">{{ 123456789 | number }} <!-- 1,234,567,890 --></span>
<span style="font-size:18px;">{{ [{ 'name': 'Ari', 'status': 'awake' },{ 'name': 'Q', 'status': 'sleeping' },{ 'name': 'Nate', 'status': 'awake' }] | orderBy:'name' }} <!-- [ {"name":"Ari","status":"awake"}, {"name":"Nate","status":"awake"}, {"name":"Q","status":"sleeping"} ] --></span>
<span style="font-size:18px;">{{ "San Francisco is very cloudy" | uppercase }} <!-- SAN FRANCISCO IS VERY CLOUDY --></span>
<span style="font-size:18px;">angular.module('myApp.filters', []) .filter('capitalize', function() { return function(input) { // input是我们传入的字符串 if (input) { return input[0].toUpperCase() + input.slice(1); } }); </span>
<span style="font-size:18px;"><!-- Ginger loves dog treats --> {{ 'ginger loves dog treats' | lowercase | capitalize }}</span>
标签:
原文地址:http://blog.csdn.net/cwl421/article/details/51338459