<script type="text/javascript" src="../plugins/angularjs/angular.min.js"> </script>
<script src="../plugins/angularjs/pagination.js"></script>
<link rel="stylesheet" href="../plugins/angularjs/pagination.css">
<script type="text/javascript" src="../js/base_pagination.js"> </script>
<script type="text/javascript" src="../js/service/typeTemplateService.js"> </script>
<script type="text/javascript" src="../js/controller/baseController.js"> </script>
<script
type="text/javascript"
src="../js/controller/typeTemplateController.js">
</script>
<tm-pagination conf="paginationConf"></tm-pagination>
<body class="hold-transition skin-red sidebar-mini" ng-app="pinyougou"
ng-controller="typeTemplateControlle
<tr ng-repeat="entity in list">
<td><input type="checkbox"></td>
<td>{{entity.id}}</td>
<td>{{entity.name}}</td>
<td>{{entity.brandIds}}</td>
<td>{{entity.specIds}}</td>
<td>{{entity.customAttributeItems}}</td>
<td class="text-center">
<button type="button" class="btn bg-olive btn-xs" data-toggle="modal"
data-target="#editModal" >修改</button>
</td>
</tr>
<link rel="stylesheet" href="../plugins/select2/select2.css" />
<link rel="stylesheet" href="../plugins/select2/select2-bootstrap.css" />
<script src="../plugins/select2/select2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/angular-select2.js"> </script>
$scope.brandList={data:[{id:1,text:'联想'},{id:2,text:'华为'},{id:3,text:'小米'}]};//
品牌列表
<input select2 select2-model="entity.brandIds"
config="brandList" multiple
placeholder="选择品牌(可多选)" class="form-control" type="text"/>
<select id="selectOptionList" resultType="java.util.Map" >
select id,name as text from tb_brand
</select>
List<Map> selectOptionList();
/**
* 品牌下拉框数据
*/
List<Map> selectOptionList();
/**
* 列表数据
*/
public List<Map> selectOptionList() {
return brandMapper.selectOptionList();
}
@RequestMapping("/selectOptionList")
public List<Map> selectOptionList(){
return brandService.selectOptionList();
}
//下拉列表数据
this.selectOptionList=function(){
return $http.get('../brand/selectOptionList.do');
}
//控制层
app.controller('typeTemplateController' ,function($scope,$controller ,typeTemplate
Service ,brandService){
$scope.brandList={data:[]};//品牌列表
//读取品牌列表
$scope.findBrandList=function(){
brandService.selectOptionList().success(
function(response){
$scope.brandList={data:response};
}
);
}
<script type="text/javascript" src="../js/base_pagination.js"> </script>
<script type="text/javascript" src="../js/service/typeTemplateService.js"> </script>
<script type="text/javascript" src="../js/service/brandService.js"> </script>
<script type="text/javascript" src="../js/controller/baseController.js"> </script>
<script type="text/javascript"
src="../js/controller/typeTemplateController.js">
</script>
<body class="hold-transition skin-red sidebar-mini" ng-app="pinyougou"
ng-controller="typeTemplateController" ng-init="findBrandList()">
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |