or
01.module MyNamespace {02. 'use strict';03. 04. export class Cluster {05. public clusters: Cluster[];06. public parentId: string;07. public dateCreated: Date;08. public dateModified: Date;09. 10. constructor(11. public id: string,12. public matrixId: string,13. public name: string,14. public position: number15. ) {16. 17. this.clusters = [];18. this.dateCreated = new Date();19. this.dateModified = new Date();20. }21. }22.}The Demo here:
http://demos.kendoui.com/web/mvvm/widgets.html
Shows how to bind to a number of widgets in the Kendo UI library. But I haven't had luck with some others including the menu. I've tried to convert the example here:
http://demos.kendoui.com/web/menu/index.html
To use the MVVM framework in the most straighforward manner. To be sure the KendoUI library was properly referenced, I put the MVVM test together with the non-MVVM method show in the demo. The result is that only the non-MVVM method works. The MVVM menu does not render (it shows up empty - just a thin horizontal line). There are no runtime errors or exceptions thrown.
HTML:
<body>
<ul id="menu">
</ul>
<br />
<ul data-role="menu" data-bind="source: dataSource">
</ul>
</body>
JavaSript:$(document).ready(documentReady);
var viewModel = {
dataSource: [
{
text: "Menu Item 1",
items: [
{ text: "Sub Menu Item 1" },
{ text: "Sub Menu Item 2" }
]
},
{ text: "Menu Item 2" }
]};
function documentReady() {
$("#menu").kendoMenu(viewModel);
kendo.bind($("body"), kendo.observable(viewModel));
}