angularjs 排序入门学习
<!DOCTYPE html> <html ng-app="myApp"> <head> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height"> <!--<script src="public/js/jquery.js"></script>--> <script src="../public/ionic/js/ionic.bundle.min.js"></script> <link rel="stylesheet" type="text/css" href="../public/ionic/css/ionic.min.css"> </head> <body ng-controller="myCtrl"> <span ng-repeat="item in lists"> <div>{{item.id}} ---- {{item.name}}</div> </span> </body> </html> <script> angular.module('myApp', ['ionic']) .controller('myCtrl', function($scope,$ionicModal,$q,$http) { var myArrayData = [{ "id": 35, "name": "单人床", "price": 100, "unit": "套", "num": 0, "icon": "/Public/Static/Wap/V20/img/icon/cccm/drc.jpg" }, { "id": 36, "name": "双人床", "price": 150, "unit": "套", "num": 0, "icon": "/Public/Static/Wap/V20/img/icon/cccm/src.jpg" }, { "id": 37, "name": "沙发", "price": 150, "unit": "套", "num": 0, "icon": "/Public/Static/Wap/V20/img/icon/cccm/sf.jpg" }, { "id": 38, "name": "窗帘", "price": 15, "unit": "平米", "num": 0, "icon": "/Public/Static/Wap/V20/img/icon/cccm/cl.jpg" }, { "id": 39, "name": "地毯", "price": 20, "unit": "平米", "num": 0, "icon": "/Public/Static/Wap/V20/img/icon/cccm/dt.jpg" }]; $scope.lists =myArrayData; }); </script>
相关推荐
绿豆饼 2020-07-28
半纸药笺 2020-07-26
半纸药笺 2020-06-14
芯果科技蔡彦 2020-04-30
芯果科技蔡彦 2020-04-14
kfq00 2020-04-10
samllcat 2020-03-27
ZillahV0 2016-08-27
半纸药笺 2019-11-18
qixiang0 2015-04-24
shichong 2015-05-14
庆华 2015-12-26
genglang 2016-05-01
琪凡睿 2016-04-28
GoDotDotDot 2018-12-12
WarmPure 2018-10-02
青 2017-09-19
GoDotDotDot 2017-07-21