页面代码
<script type="text/javascript" src="../js/base_pagination.js"></script>
<script type="text/javascript" src="../plugins/select2/angular-select2.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>
<body class="hold-transition skin-red sidebar-mini" ng-app="pinyougou" ng-controller="typeTemplateController" >
<table id="dataList" class="table table-bordered table-striped table-hover dataTable">
<thead>
<tr>
<th class="" style="padding-right:0px">
<input id="selall" type="checkbox" class="icheckbox_square-blue">
</th>
<th class="sorting_asc">模板ID</th>
<th class="sorting">分类模板名称</th>
<th class="sorting">关联品牌</th>
<th class="sorting">关联规格</th>
<th class="sorting">扩展属性</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
<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>
</tbody>
</table>
<!--数据列表/-->
<tm-pagination conf="paginationConf"></tm-pagination>
<tr>
<td>关联品牌</td>
<td>
<input select2 select2-model="entity.brandIds" config="brandList" multiple placeholder="选择品牌(可多选)" class="form-control" >
</td>
</tr>
</body>
typeTemplateController
$scope.brandList={data:[{id:1,text:'联想'},{id:2,text:'华为'},{id:3,text:'中兴'}]};
静态列表