Reputation: 67
Here is my code
<ul kendo-menu k-orientation="horizontal" k-options="kendomenu">
<li ng-repeat="toplevel in UserMenu.TopLevels" class="k-item k-state-default" role="menuitem" >
<span class="k-link">
{{toplevel.name}}
<span class="k-icon k-i-arrow-s"></span>
</span>
<ul class="k-group k-menu-group k-popup k-reset" role="menu" ng-repeat="level2 in toplevel.levels" >
<li class="k-item k-state-default" ng-repeat="view in level2.views"><span class="k-link" ng-click="addTab(view.name,getTemplate(view.link))">{{view.name}}</span></li>
</ul>
</li>
</ul>
I want to open this LI on UL click
<li class="k-item k-state-default" ng-repeat="view in level2.views"><span class="k-link" ng-click="addTab(view.name,getTemplate(view.link))">{{view.name}}</span></li>
Upvotes: 3
Views: 801
Reputation: 3185
Kendo Menu has a property which you can set to open the menu on click instead of Hover.
In your Controller create a property as
$scope.kendoMenuOptions = {
openOnClick: true
};
and then in the HTML set the options as:
k-options="kendoMenuOptions"
Upvotes: 2