Angularjs数据切换=下拉列表不使用选择选项
在我的代码中,我使用了简单的下拉绑定,带有使用ng repeat的选项,但当我绑定该选项时,它不会显示任何内容,因为javascript中可能启用了一些额外的类。我的正常代码是:Angularjs数据切换=下拉列表不使用选择选项,angularjs,angularjs-directive,Angularjs,Angularjs Directive,在我的代码中,我使用了简单的下拉绑定,带有使用ng repeat的选项,但当我绑定该选项时,它不会显示任何内容,因为javascript中可能启用了一些额外的类。我的正常代码是: <div class="col-md-6 col-sm-12"> <label>Select Employee</label> <select class="form-control show tick" id="selectEmp" name="
<div class="col-md-6 col-sm-12">
<label>Select Employee</label>
<select class="form-control show tick" id="selectEmp" name="toEmployeeCode" required="" ng-model="toEmployeeCode">
<option value="">Select Team Member</option>
<option ng-repeat="x in AllEmployee" value="{{x.EmployeeCode}}">{{x.FirstName}} {{x.MiddleName}} {{x.LastName}}</option>
</select>
</div>
不要在
中使用ng repeat
,它工作不正常。改为在select中使用
选择团队成员选择团队成员
但它不显示链接
<div class="btn-group bootstrap-select form-control tick">
<button type="button" class="btn dropdown-toggle bs-placeholder btn-round
btn-simple" data-toggle="dropdown" role="button" data-id="selectEmp"
title="Select Team Member" aria-expanded="false">
<span class="filter-option pull-left">Select Team Member</span>
<span class="bs-caret"><span class="caret"></span></span>
</button>
<div class="dropdown-menu" role="combobox">
<ul class="dropdown-menu inner" role="listbox" aria-expanded="false">
<li data-original-index="0" class="selected">
<a tabindex="0" class="" data-tokens="null" role="option" aria-
disabled="false" aria-selected="true">
<span class="text">Select Team Member</span>
<span class="glyphicon glyphicon-ok check-mark"></span>
</a>
</li>
<li data-original-index="1">
<a tabindex="0" class="" data-tokens="null" role="option" aria-
disabled="false" aria-selected="false">
<span class="text ng-binding"> </span>
<span class="glyphicon glyphicon-ok check-mark"></span>
</a>
</li>
</ul>
</div>
<select class="form-control show tick ng-pristine ng-untouched ng-
invalid ng-invalid-required" id="selectEmp" name="toEmployeeCode"
required="" ng-model="toEmployeeCode" tabindex="-98" aria-
required="true">
<option value="">Select Team Member</option>
<option ng-repeat="x in AllEmployee" value="EMP-1004" class="ng-
binding ng-scope">ABC</option>
<option ng-repeat="x in AllEmployee" value="EMP-1007" class="ng-
binding ng-scope">PQR</option>
<option ng-repeat="x in AllEmployee" value="EMP-1008" class="ng-
binding ng-scope">ASD</option>
<option ng-repeat="x in AllEmployee" value="EMP-1009" class="ng-
binding ng-scope">ZXC</option>
<option ng-repeat="x in AllEmployee" value="EMP-1010" class="ng-
binding ng-scope">HUK</option>
</select>
</div>
var app = angular.module('App', ['ui.router','ui.bootstrap']);