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 Answers, 1 is accepted
0
Accepted
Daniel
Telerik team
answered on 01 Dec 2016, 08:19 AM
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.