<select ui-select2="{allowClear: true }" ng-model="orderTreatInfo.performDeptId" id="treatPerformDeptId"> <option value=""></option> <option ng-repeat="performDept in performDeptList" value="{{::performDept.deptCode}}"> {{::performDept.deptName}} </option> </select>
performDeptList 是下拉列表要显示的内容,是一个数组用来ng-repeat遍历的
performDept 是 performDeptList 的每一项
value="{{::performDept.deptCode}}" 如果选中这一项value的值就会被赋值给 $scope.orderTreatInfo.performDeptId
{{::performDetp.deptName}}是用来显示在select中的内容 选择这个 则实际赋值的则是其option标签中的value值