angularjs ng-repeat ordering string arrays in numerical order

前端 未结 2 1669
慢半拍i
慢半拍i 2021-01-03 12:02

I have a list of post with ids like 1,2,3,4,5,6,7,8,9,10,11,12 (json format) The ids are of type String. But I would like to order it according to its numerical

2条回答
  •  耶瑟儿~
    2021-01-03 12:23

    Ideally it should Print the correct list in ng-repeat using order-by. I am adding a fiddle example with the same.Its a basic example. Hope it helps

    >  http://jsfiddle.net/L45cE/
    

提交回复
热议问题