This is a migrated thread and some comments may be shown as answers.

AngularJs and KendoUI

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PICKUP
Top achievements
Rank 2
PICKUP asked on 21 Aug 2013, 10:16 AM
hy,

I'm trying to develop an MVC4 Single Page Application  based on AngularJs and KendoUI 

1/ In my index.html:
//I have thos lines :
    <script src="/Scripts/jquery-1.10.2.min.js"></script>
    <script src="/Scripts/angular.min.js"></script>
    <script src="/Scripts/kendo/2013.2.716/kendo.all.min.js"></script>
    <script src="/Scripts/angular-kendo.js"></script>
//I have this line :
 <div kendo-grid k-data-source="things" 
     k-columns='[
    {"field": "Id","title": "Id"}, 
    {"field": "Country","title": "Country"}
    ]'
    >
</div>
2/In my app.js :
var app = angular.module('appModuleName', ['kendo.directives']).config......
3/in my controller.js:
$scope.things= new kendo.data.DataSource({
        transport: {
            read: "[{ 'Id': 1 , 'Country': 'England01'}, { 'Id': 2 , 'Country': 'England02'}, { 'Id': 3 , 'Country': 'England03'}]"
        }
    });


>> when i add the line : {{things}} , i have the scope, but i do not see the grid in my page !!!

Thanks a lot for your help.
Best M,

1 Answer, 1 is accepted

Sort by
0
Burke
Telerik team
answered on 03 Sep 2013, 08:49 AM
Hi,

 Would you mind opening these Angular Kendo UI issues on the GitHub repo issues list?  That's where we track and close all of these issues.

I think that your issue is cased by the fact that In the DataSource, you only use transport if you are calling a remote service.  For a static list of items, uou just use "data".

Here is a working example...

http://plnkr.co/edit/F4iReK2PbyzZAGCXJOb0?p=preview

Regards,
Burke
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
PICKUP
Top achievements
Rank 2
Answers by
Burke
Telerik team
Share this question
or