Search code examples
javascriptangularjskendo-uikendo-grid

Kendo Grid: Can we run example with Angular using jsfiddle?


I wanted to be able to make available some examples of the Kendo grid when asking questions here. I have put the most basic one here, but nothing shows up.

The code is:

<div data-ng-app="app">
<div data-ng-controller="Grid as vm">
    <div kendo-grid='grid' k-options="vm.options"></div>
</div>
</div>
(function () {
 angular.module("app", ["kendo.directives"])
    .controller("Grid", Grid);

function Grid() {
    var vm = this;
    var gridData = [{
        col1: 'data1',
        col2: 'data2'
    }, {
        col1: 'data1',
        col2: 'data2'
    }];

    vm.options = {
        dataSource: gridData,         
        editable: true
    };
}
})();

Should this be possible, have I missed something? (The sample runs locally).


Solution

  • You just need to change the way that the scripts are included in the fiddle. Instead of "onLoad", use "No wrap".