Javascript 按猫鼬日期重复。现在?
我正试图在收件箱中发送最后一封邮件时订购ng repeat指令。以下是“对话”的结构 我的收件箱是一系列“对话”。我想在最后一条留言的日期前订购。我尝试了以下方法: 控制器:Javascript 按猫鼬日期重复。现在?,javascript,angularjs,mongoose,angularjs-ng-repeat,Javascript,Angularjs,Mongoose,Angularjs Ng Repeat,我正试图在收件箱中发送最后一封邮件时订购ng repeat指令。以下是“对话”的结构 我的收件箱是一系列“对话”。我想在最后一条留言的日期前订购。我尝试了以下方法: 控制器: $scope.inbox = [conversations] // assume full of conversations <div ng-repeat="c in inbox | orderBy: 'c.messages[c.messages.length - 1].date':true"></di
$scope.inbox = [conversations] // assume full of conversations
<div ng-repeat="c in inbox | orderBy: 'c.messages[c.messages.length - 1].date':true"></div>
html:
$scope.inbox = [conversations] // assume full of conversations
<div ng-repeat="c in inbox | orderBy: 'c.messages[c.messages.length - 1].date':true"></div>
我希望排序可以工作,但它的排序与控制器中的数组中的排序相同。我怀疑它不知道如何按猫鼬的日期点菜。现在