1
我正在创建一个web应用程序,我使用引导selectpicker选择..但我使用angularjs来填充选择选择器..我有2选择一个内容的基础上填充无需重新加载..我能很好地工作它而不selectpicker虽然它不工作时使用selectpicker第一选择值..我的代码是Angularjs不工作在引导selectpicker
<div class="form-group" data-ng-controller="MARK_ENTRY_CONTROLLER">
<div class="row">
<div class="col-md-6 " style="margin-top: 7px;">
<label>Select Class</label>
</div>
<div class="col-md-6 text-center">
<select class="form-control" title="Select Class"
name="fromClass" ng-change="EXAM_LIST_JSON(fromClass)"
ng-model="fromClass"
ng-options="fromClass.id as fromClass.course + ' ' + fromClass.section for fromClass in ALL_CLASS">
</select>
</div>
</div>
<div class="row" style="height: 10px"></div>
<div class="row">
<div class="col-md-6 " style="margin-top: 7px;">
<label>Select Examination</label>
</div>
<div class="col-md-6 text-center" >
<select class="form-control" name="examination"
ng-change="SUBJECT_LIST_IN_EXAM_JSON()"
ng-model="examination"
ng-options="examination.id as examination.name for examination in EXAM_LIST"></select>
</div>
</div>
和控制器
<script>
function MARK_ENTRY_CONTROLLER($scope, $http) {
$http.get("<%=request.getContextPath()%>/ALL_CLASS_JSON?AAdvisorId=${uid}").success(function(response) {
$scope.ALL_CLASS = response;
$scope.EXAM_LIST_JSON = function(id){
$http.get("<%=request.getContextPath()%>/EXAM_LIST_JSON?fromClass="+id)
.success(function(response) {
$scope.EXAM_LIST = response;
$scope.$apply();
});
}
});
}
</script>
在这里,在控制器的数据的列表是从一个JSON文件使用JSON格式获得.. 请帮我..
你救了我的一天。谢谢! – Margaret 2016-09-23 12:57:22
是否有可能不依赖于jQuery? – ellockie 2017-11-28 17:42:13