4
請參見本文的jsfiddle http://jsfiddle.net/luke88jones/MfLqa/2/AngularJS ngRepeat ORDERBY不與時間字符串工作
<div ng-repeat="booking in testBookings | orderBy: 'booking.sortDate'">
<span>{{booking.bookingDateTime | date:'dd-MMM-yy HH:mm'}}</span>
</div>
我試圖使用OrderBy來排序NG重複。我們的數據當前使用不適用的過濾器的bookingDateTime。我不確定angular是不是解析函數,所以把sortDate屬性作爲ISO字符串放入,並試圖用這個排序,但它似乎並沒有工作。
任何想法?