【发布时间】:2016-10-27 17:28:23
【问题描述】:
我尝试使用ui-select,而不是在 Angular 应用程序中选择。我的问题是 ui-select 不可见。
这是带有 select 的工作代码:
<select class = "form-control"
ng-model = "vm.user">
<option ng:repeat = "u in vm.users"
value = "{{u.id}}">
{{u.login}}
</option>
</select>
无法使用 ui-select 的代码
<ui-select ng-model = "vm.user"
style = "width: 300px; height: 50px">
<ui-select-choices repeat = "u in vm.users">
<div ng-bind-html = "u.login"></div>
</ui-select-choices>
</ui-select>
index.html
<!-- UI-Select -->
<link href = "content/select.min.css"
rel = "stylesheet" />
<!-- Angular -->
<script src = "scripts/angular.min.js"></script>
<!-- UI-Select -->
<script src="scripts/select.min.js"></script>
知道什么是错的吗?
【问题讨论】:
-
您是否将 ui-select 模块添加为您的应用程序的依赖项?我猜不会。
-
@Pierre Gayvallet:不,我忘记了,请发表答案我会接受...谢谢