//购物车服务层app.service('cartService',function($http){
//购物车列表
this.findCartList=function(){
}
});
//购物车控制层app.controller('cartController',function($scope,cartService){
//查询购物车列表
$scope.findCartList=function(){ cartService.findCartList().success(
function(response){
$scope.cartList=response;
}
);
}
});
<script type="text/javascript" src="plugins/angularjs/angular.min.js"> </script>
<script type="text/javascript" src="js/base.js"> </script>
<script type="text/javascript" src="js/service/cartService.js"> </script>
<script type="text/javascript" src="js/controller/cartController.js"> </script>
<body ng-app="pinyougou" ng-controller="cartController" ng-init="findCartList()">
<div class="cart-item-list" ng-repeat="cart in cartList">
<div class="cart-shop">
<input type="checkbox" name="" id="" value="" />
<span class="shopname self">{{cart.sellerName}}【商家 ID:{{cart.sellerId}}】
</span>
</div>
<div class="cart-body">
<div class="cart-list" ng-repeat="orderItem in cart.orderItemList">
<ul class="goods-list yui3-g">
<li class="yui3-u-1-24">
<input type="checkbox" name="" id="" value="" />
</li>
<li class="yui3-u-11-24">
<div class="good-item">
<div class="item-img"><img src="{{orderItem.picPath}}"
/></div>
<div class="item-msg">
{{orderItem.title}}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |