如何在AngularJS指令中包装kendoAutoComplete

时间:2014-04-02 07:24:38

标签: angularjs kendo-ui

我正在尝试在Angular指令中包装kendoAutocomplete。问题是我收到以下错误消息:TypeError:'undefined'不是函数(评估'e(data)')

任何想法可能是问题的原因?

<input id="selectDomain" select-kendo=""/>

-----

var kendo = angular.module('kendo',[]);

kendo.directive('selectKendo', function () {

    var data = [
        "Sweden",
        "Switzerland",
        "Turkey",
        "Ukraine",
        "United Kingdom",
        "Vatican City"
    ];

    return {

        restrict: 'A',

        scope: {
        },

        link: function (scope, element) {

            console.log(element);

            $(element).kendoAutoComplete({
                dataSource: data,
                filter: "startswith",
                placeholder: "Domain",
                separator: ", "
            });
        }
    }
});

0 个答案:

没有答案