我在尝试使用 ui-select 库时遇到了一些问题。我正在尝试使用选择下拉功能,但它不能正常工作。
这是使用的库:https ://github.com/angular-ui/ui-select
这是我的html代码:
<h3>Array of strings</h3>
<ui-select multiple ng-model="selCountry.selLoc" theme="/resources/ui-select/bootstrap" ng-disabled="disabled" style="width: 300px;">
<ui-select-match placeholder="Select locations...">{{$selCountry.selLoc}}</ui-select-match>
<ui-select-choices repeat="loc in selCountry.locations| filter:$select.search">
{{loc}}
</ui-select-choices>
</ui-select>
它出现的错误是:未定义不是一个函数,当我单击 ui-selext 框时它会出现这个错误。
TypeError: undefined is not a function
at link (http://localhost:8090/resources/ui-select/select.js:1202:11)
at H (http://localhost:8090/resources/js/angular-1.2.12.min.js:49:375)
at f (http://localhost:8090/resources/js/angular-1.2.12.min.js:42:399)
at H (http://localhost:8090/resources/js/angular-1.2.12.min.js:49:316)
at f (http://localhost:8090/resources/js/angular-1.2.12.min.js:42:399)
at http://localhost:8090/resources/js/angular-1.2.12.min.js:42:67
at http://localhost:8090/resources/js/angular-1.2.12.min.js:43:303
at A (http://localhost:8090/resources/js/angular-1.2.12.min.js:47:46)
关于可能是什么问题的任何建议?
谢谢
附言
当我单击 select.js 错误链接时,它会将我带到以下代码。
// Recreates old behavior of ng-transclude. Used internally.
.directive('uisTranscludeAppend', function () {
return {
link: function (scope, element, attrs, ctrl, transclude) {
transclude(scope, function (clone) {
element.append(clone);
});
}
};
})
不确定是什么导致了该问题,因为代码与示例代码非常相似。