//在HTML页面上
{{ 2015-12-07T15:59:59.000Z | date }} //结果:December 7, 2015
{{ 2015-12-07T15:59:59.000Z | date:"MM/dd/yyyy @ h:mma" }} //结果:12/07/2015 @ 3:59PM
{{ 2015-12-07T15:59:59.000Z | date:"yyyy-MM-dd HH:mm:ss" }} //结果:2015-12-07 15:59:59,当HH为小写hh时,是12小时日制
//在js里
$scope.today = $filter('date')(new Date(), 'yyyy-MM-dd');
于此相关的就是经常将列表按照时间顺序排列,请看下面的代码
//HTML页面
<div ng-repeat="record in recordWithDivider | orderBy:'AddTime':true"> //默认或者true都为倒叙,false为正序
//在js里
$scope.lists = $filter('orderBy')(array, expression, reverse)