arrays - Ajax GET returns Object #<Object> has no method 'slice' error -
i create next ajax call,
$scope.clientlist = []; $http({ method: 'get', isarray: true, url: "https://localhost/api/client", params: sort, }).success(function (data, status, headers, config) { $scope.clientlist = data; }). error(function (data, status, headers, config) { }); i array result in data. error,
typeerror: object #<object> has no method 'slice' inspite of adding isarray: true.
anything missing ?
$scope.clientlist = []; $http({ method: 'get', isarray: true, url: "https://localhost/api/client", params: sort, }).success(function (data, status, headers, config) { $scope.clientlist = data.data; }). error(function (data, status, headers, config) {
sorry simple conversion issue. assigning object instead of array within object returned.
ajax arrays angularjs get typeerror
No comments:
Post a Comment