2013-07-21 79 views
3

我想我的排序依據計算表達式角排序依據評估表達

目前我有:

ng_repeat: "post in posts | orderBy:"up_votes" 

我想它,而不是通過{{up_votes - down_votes}}訂購

回答

6
ng_repeat: "post in posts | orderBy:'down_votes - up_votes'" 

只需使用單引號來包裝表達式排序依據

或者你合作uld爲控制器添加投票Diff功能,並做orderBy:voteDiff