文章詳情頁
angular.js - angular ng-repeat通過數(shù)值的大小從小到大排序
瀏覽:154日期:2024-09-24 15:05:56
問題描述
使用ng-repeat循序出來的p按照returnbanner里面的index值從小到大排序,怎么做呢
問題解答
回答1:升序:
<ul> <li ng-repeat='user in users | orderBy:user.index'>{{user.name}}</li></ul>
倒序:
<ul> <li ng-repeat='user in users | orderBy:user.index:’desc’'>{{user.name}}</li></ul>
多看看官方文檔...
相關(guān)文章:
1. 請教使用PDO連接MSSQL數(shù)據(jù)庫插入是亂碼問題?2. node.js - nodejs開發(fā)中常用的連接mysql的庫3. Python爬蟲如何爬取span和span中間的內(nèi)容并分別存入字典里?4. mysql - 分庫分表、分區(qū)、讀寫分離 這些都是用在什么場景下 ,會帶來哪些效率或者其他方面的好處5. 視頻文件不能播放,怎么辦?6. python - 數(shù)據(jù)與循環(huán)次數(shù)對應(yīng)不上7. mysql - 把一個表中的數(shù)據(jù)count更新到另一個表里?8. 黑客 - Python模塊安全權(quán)限9. flask - python web中如何共享登錄狀態(tài)?10. mysql 查詢身份證號字段值有效的數(shù)據(jù)
排行榜

熱門標(biāo)簽