0
顯示它按照語言顯示結果。假設在myAngApp1.value中有英文,它將顯示英文。但是在SharePoint列表中,所有四種語言的英語值都是四次顯示結果。 我的要求是,如果myAngApp1.value等於英文,那麼它不應該顯示4倍英語。如果顯示相同的數據,則在ng-show中只顯示一個值
<span ng-show = "(customer.GLAcctLongTextEN).indexOf(myAngApp1.value)!=-1">
{{customer.GLAcctLongTextEN}}
</span>
<span ng-show = "(customer.GLAcctLongTextPT).indexOf(myAngApp1.value)!=-1">
{{customer.GLAcctLongTextPT}}
</span>
<span ng-show = "(customer.GLAcctLongTextES).indexOf(myAngApp1.value)!=-1">
{{customer.GLAcctLongTextES}}
</span>
<span ng-show = "(customer.GLAcctLongTextZH).indexOf(myAngApp1.value)!=-1">
{{customer.GLAcctLongTextZH}}
</span>
<span ng-show = "(customer.GCoAGLcode).indexOf(myAngApp1.value)!=-1">
{{customer.GLAcctLongTextEN}}
</span>
<span ng-show = "(customer.Title).indexOf(myAngApp1.value)!=-1" >
{{customer.GLAcctLongTextEN}}
</span>
</td>
嘗試使用[angular-translate](http://stackoverflow.com/questions/20540877/correct-use-for-angular-translate-in-controllers)。 – Mistalis
@Mistalis是對的,沒有重新發明輪子的意義。 – SinDeus