【发布时间】:2014-07-03 00:09:05
【问题描述】:
我有一个简单的对象:
"socials": {
"f": "#/facebook/",
"B": "#/behance/",
"d": "#/dribble/",
"L": "#/linkedin/",
"P": "#/pinterest/"
}
当我尝试使用 ng-repeat="(key, value) in data.socials" 时,它的排序如下:B L P d f.
$index 捕获错误的索引,就像它已经被排序一样。如何正确订购它,因为它在 JSON 文件中?或者也许我怎样才能获得正确的索引来使用orderBy: correctIndex?我发现了一个小提琴,它显示了一个完全像这样的问题:http://jsfiddle.net/zMjVp/
【问题讨论】: