We can Implement the menu in Kendo UI using MVVM Pattern just in two step.
Step 1: Create an HTML page using any text editor in my case I named it as KenodMenu.html and write the following code in it.
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Untitled</title>
  6. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.common.min.css">
  7. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.rtl.min.css">
  8. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.default.min.css">
  9. <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.mobile.all.min.css">
  10. <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  11. <script src="http://kendo.cdn.telerik.com/2015.3.930/js/angular.min.js"></script>
  12. <script src="http://kendo.cdn.telerik.com/2015.3.930/js/jszip.min.js"></script>
  13. <script src="http://kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js"></script>
  14. </head>
  15. <body>
  16. <div id="example" class="container">
  17. <div class="row">
  18. <ul data-role="menu" style="width: 50%;">
  19. <li> Home
  20. <ul>
  21. <li> Furniture
  22. <ul>
  23. <!-- moving the UL to the next line will cause an IE7 problem -->
  24. <li>Sofas</li>
  25. <li>Beds</li>
  26. </ul>
  27. </li>
  28. </ul>
  29. </li>
  30. <li> Electronics
  31. <ul>
  32. <li> Mobiles </li>
  33. <li> Laptops </li>
  34. </ul>
  35. </li>
  36. </ul>
  37. </div>
  38. </div>
  39. </body>
  40. </html>
The data-role property is used to set the menu
JavaScript with MVVM model
  1. var viewModel = kendo.observable({
  2. isVisible: true,
  3. });
  4. kendo.bind($("#example"), viewModel);
From the above script we are going to enable the Kendo Menu.
Result in Browser