mr.robot
mr.robot

Reputation: 17

Kendo autocomplete dynamic datasource (AngularJS, kendo ui)

I don`t really understand why I cant call function in kendo autocomplete k-data-soruce.

index

<input kendo-auto-complete ng-model="filter.FilterValue" k-data-source="filteredData()" style="width: 100%;" />ter code here

controller

var test = ["aa", "ab", "ac", "zz"];
return test; 

maybe someone can help

Upvotes: 0

Views: 303

Answers (1)

SehaxX
SehaxX

Reputation: 764

Here you have an example of how to do filtering from a method in AngularJS.

Please see this dojo.

  angular.module("KendoDemos", [ "kendo.directives" ])
      .controller("MyCtrl", function($scope){
          var data = ["Albania", "Andorra", "Armenia", "Austria"];              
          $scope.countryNames = function(){
            return data;
          }                
      })

Hope this will help you.

Cheers,

Upvotes: 1

Related Questions