这是我的场景
<selectclass="form-control" id="my_select"><optionvalue="0">List is Number</option><option value="1">List is Alphabetical</option></select>
<liclass="ui-state-default " ng-repeat="damageResult in damageResultList> <span>{{damageResult.damageMechanismList}}hfgh</span></li>
最佳答案
在该字段上应用 orderBy
过滤器。您可以了解更多here关于排序。
ng-repeat="damageResult in damageResultList | orderBy:'YOUR_FIELD_NAME'"
关于javascript - 如何在 angularjs 中按字母和数字顺序对列表进行排序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40880752/