AngularJs and KendoUI

2 posts, 0 answers
  1. PICKUP
    PICKUP avatar
    9 posts
    Member since:
    Sep 2011

    Posted 21 Aug 2013 Link to this post

    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,

  2. Burke
    Admin
    Burke avatar
    11 posts

    Posted 03 Sep 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top