【发布时间】:2019-09-17 04:19:33
【问题描述】:
我尝试将过滤器添加到 KendoUI 下拉列表中,但似乎无法正常工作。过滤器在没有角度的情况下工作正常。但是当我用 angular 添加它时,它不会在下拉列表中显示类型过滤器。我用的是官网的例子。
<div ng-controller='myctrl'>
<h4 style="padding-top: 2em;">Remote data</h4>
<select kendo-drop-down-list
k-data-text-field="'ProductName'"
k-data-value-field="'ProductID'"
k-data-source="productsDataSource"
style="width: 100%">
</select>
<div>
控制器
angular.module('myApp', ["kendo.directives"])
.controller('myctrl', ['$scope', function($scope) {
$scope.productsDataSource = {
type: "odata",
serverFiltering: true,
filter: "startswith",
transport: {
read: {
url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Products",
}
}
};
}]);
这是jsfiddle。
【问题讨论】:
标签: angularjs kendo-ui kendo-dropdown