问题
I am using angular-kendo ui for a number of components but have encountered an issue which I can't seem to resolve. I have the following angular select which works fine and binds the selected value to the ng-model correctly.
<select ng-model="link.CompanyId" ng-options="obj.Id as obj.Name for obj in link.PossibleCompanies"></select>
Then I add the kendo-drop-down-list argument to convert it to a Kendo DD and it stops binding the selected value of ng-model.
<select kendo-drop-down-list ng-model="link.CompanyId" ng-options="obj.Id as obj.Name for obj in link.PossibleCompanies"></select>
Can anybody point me in the right direction of a solution for me able to use the kendo ddl with angular and still have the selected value of ng-model bind to the list.
回答1:
I think you should try using k-ng-model
and k-ng-options
rather than ng-options
and ng-model
.
来源:https://stackoverflow.com/questions/24080130/angular-kendo-drop-down