AdminLte Search2无法正常工作意味着没有在选择框中显示搜索,我已经包含了css和js文件并使用如下所示,并且我还包含了bootstrap相关的css和js文件
<html>
<head>
<link rel="stylesheet" href="bower_components/select2/dist/css/select2.min.css">
</head>
<body>
<select class="form-control select2" style="width: 100%;" ng-options="t.id as t.name for t in tags" ng-model="t_id">
<option selected="selected">Select Tag</option>
</select>
<script src="bower_components/select2/dist/js/select2.full.min.js"></script>
<script>
$(function () {
//Initialize Select2 Elements
$('select2').select2();
});
</script>
</body>
</html>
答案 0 :(得分:2)
它将起作用 $('。select2')。select2();
答案 1 :(得分:0)