Hi,
when i use k-ng-model to bind my value the initially set index does not work. The model variable is not defined on startup. When i change k-ng-model to ng-model the first item is selected.
Here's my code:
1.
<
select
class
=
"form-control"
kendo-drop-down-list
k-options
=
"dropDownOptions"
k-ng-delay
=
"dropDownOptions"
k-value-primitive
=
"true"
k-ng-model
=
"dataRecord"
>
2.
</
select
>
01.
angular.module(
"KendoDemos"
, [
"kendo.directives"
])
02.
.controller(
"MyCtrl"
,
function
($scope) {
03.
var
dataSource = [];
04.
dataSource.push({
05.
value:
"1"
,
06.
text:
"Januar"
07.
});
08.
09.
$scope.dropDownOptions = {
10.
dataSource: dataSource,
11.
dataTextField:
"text"
,
12.
dataValueField:
"value"
,
13.
index: 0
14.
};
15.
})
Thanks for your help.