Get Selected Object Of Kendo Drop Down List

Viewed 26617

I am using the Kendo Drop Down List. More specifically, I'm using Kendo Angular directives. Currently, I have the following in my markup:

<input id='myDropDownList' kendo-drop-down-list ng-model="selectedSport" k-data-source="sports" k-data-text-field="'name'" />
<button ng-click='send()'>Submit</button>

My controller has the following:

$scope.selectedSport = null;
$scope.sports: [
  { id: 1, name: 'Basketball' },
  { id: 2, name: 'Football' },
  { id: 3, name: 'Tennis' }
];

$scope.send = function () {
  alert($scope.selectedSport);
};

When I run this code, I get the selectedSport ID. However, I want the entire object. Every other StackOverflow post I've found uses retrieves the ID. For the life of me, I can't figure out how to get the object. Does anyone know how to get the selected JSON object instead of just the id?

Thanks!

4 Answers
Related