Kendo UI Grid and Angular in IE8
yes, we have to support it
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.0.3/es5-shim.js"></script>
<script src="https://code.angularjs.org/1.2.28/angular.js"></script>
<script src="http://cdn.kendostatic.com/2014.3.1316/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1316/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1316/styles/kendo.default.min.css">
<div ng-app ="myApp">
<div ng-controller="MyCtrl">
<kendo-grid options= "mainGridOptions"></kendo-grid>
</div>
</div>
JavaScript
var app = angular.module('myApp', ['kendo.directives']);
//'https://itunes.apple.com/search?entity=album&term=ARTIST_NAME'
app.service('iTunesService', function($http ) {
var getData = function(){
return $http({
method : 'GET',
url: 'https://itunes.apple.com/search?entity=album&term=Beyonce'
}).then(function(data)
{
var a = angular.toJson(data.data.results);
console.log(a);
return a;
})
}
});
app.controller("MyCtrl", function($scope, iTunesService) {
$scope.mainGridOptions = {
dataSource: {
type: "json",
transport: {
read: "https://itunes.apple.com/search?entity=album&term=Beyonce"
},
pageSize: 5,
serverPaging: true,
serverSorting: true
},
sortable: true,
pageable: true,
columns: [{
field: "wrapperType",
title: "wrapperType",
width: "120px"
},{
field: "collectionType",
title: "collectionType",
width: "120px"
},
{
field: "artistName",
title: "artistName",
width: "120px"
}]
};
});