无论 ng-repeat 子句中的大小写(不区分大小写)如何,如何使用过滤器 orderBy 对数据进行排序?我需要编写一个自定义函数来做到这一点吗?如果有,请问有什么例子吗?谢谢。
最佳答案
它不区分大小写。见 docs关于其默认比较器:
The default, built-in comparator should be sufficient for most usecases. In short, it compares numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to using their index in the original collection, and sorts values of different types by type.
关于angularjs - orderBy 在 ng-repeat 中不区分大小写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34143980/