Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
AngularJS-对日期时间字符串的对象进行排序_Angularjs_Sorting - Fatal编程技术网

AngularJS-对日期时间字符串的对象进行排序

AngularJS-对日期时间字符串的对象进行排序,angularjs,sorting,Angularjs,Sorting,我使用angularJS显示此对象列表: <tr ng-repeat="message in vm.messages"> 我将按照与日期时间相反的顺序对消息对象进行排序。 有可能这样做吗 <tr ng-repeat="message in vm.messages | orderBy:'-time'"> 不这样做。这可能有帮助(orderBy:'time':true)这可能有帮助(orderBy:'time':true) <tr ng-repeat="mes

我使用angularJS显示此对象列表:

<tr ng-repeat="message in vm.messages">
我将按照与日期时间相反的顺序对消息对象进行排序。 有可能这样做吗

<tr ng-repeat="message in vm.messages | orderBy:'-time'"> 

不这样做。

这可能有帮助(orderBy:'time':true)这可能有帮助(orderBy:'time':true)
<tr ng-repeat="message in vm.messages | orderBy:'-time'">