I had this challenge, except that I am loading menus via AJAX request due to access control restrictions. So I had to attach the click event listener to the input box once the menu items were appended. We're also wrapping Kendo UI controls in our own directives in so we can fancy them up a bit more. So my code ended up something like this (HTH)
function
MenuCtrl($scope, $attrs, $http) {
if
(!angular.isEmpty($attrs.menuSource)) {
this
.menuSource = $attrs.menuSource;
}
else
{
this
.menuSource =
false
;
}
this
.uiOptions = {
openOnClick:
true
,
data: {}
};
success(
function
(data) {
$scope.controller.menuWidget.append(data);
$(
'.k-link :input'
, $scope.controller.menuWidget.element.context).on(
'click'
,
function
(event) {
event.stopPropagation();
});
});
$scope.controller =
this
;
}