Hello,
I have a problem with reading oData to grid datasource with angularjs.
I have the following test method:
01.$scope.search = function (searchCriteria) {02. var users = new kendo.data.DataSource({03. dataType:"odata",04. transport: {05. read: {06. async: true,08. },09. schema: {10. data: "value",11. total: "odata.count"12. },13. serverPaging: true,14. serverSorting: true,15. serverFiltering: true,16. pageSize: 517. 18. },19. sortable: true,20. pageable: true,21. 22. });23. 24. 25. 26. 27. users.read().then(function success() {28. $scope.userGridOptions.dataSource.data(users.data());29. $scope.grid.refresh();30. },31. function error(error) {32. $log.error(error);33. });34. 35. $scope.userGridOptions.pageable = true;36. $scope.userGridOptions.pageSize = 5;37. $scope.userGridOptions.scrollable = {38. virtual: true39. };40. 41. 42. };On click from view the method is called. I have an existing datasource available and I want to refresh it.
The data is retrieved nicely (see the attachment), but in the code on line 27
users.read().then(function success() {I get an error "TypeError: e.slice is not a function".
Could you please help me out. What am I doing wrong?