ListView with Angular not loading data

3 posts, 1 answers
  1. Christian
    Christian avatar
    15 posts
    Member since:
    May 2009

    Posted 29 Nov 2016 Link to this post

    Hi,

    I'm trying to create a simple ListView using Angular but I can't get the ListView to show any data. What am I doing wrong?

    http://dojo.telerik.com/@daxriders/IGeSA

    Thank you.

    Christian

  2. Answer
    Daniel
    Admin
    Daniel avatar
    2173 posts

    Posted 01 Dec 2016 Link to this post

    Hello Christian,

    There are a few issues in the provided code:
    • The app should be specified as ng-app:
      <div np-app="app">
    • The refresh call and definition should be defined outside of the dataSource options. Also note that calling read initially will cause duplicate requests. You should either remove the initial refresh call or set the autoBind option to false to avoid this.
    • The dataSource should be defined before the listOptions. Otherwise $scope.dataSource will be undefined.
    I updated the example with the suggested changes.

    Regards,
    Daniel
    Telerik by Progress
    Kendo UI is ready for Visual Studio 2017 RC! Learn more.
  3. Christian
    Christian avatar
    15 posts
    Member since:
    May 2009

    Posted 02 Dec 2016 in reply to Daniel Link to this post

    Thank you, Daniel!
Back to Top