i am new one so difficult to getting this error using resource module after calling service. can any one modify my mistake in code where i am getting wrong or just modified that
From the documentation:
Action isArray
isArray – {boolean=} – If true then the returned object for this action is an array, see returns section.
According to your code isArray = true. Set it to false and you can use an object instead of an array.
app.factory('itemService', function ($resource) {
return {
getCategoryAndBrand : $resource("/user/categories_brands" ,{},{ TypeGetCategoryAndBrand:{method: 'get', isArray:true}})
};
});
It's expecting you to pass in the parameters as an array not an object
from your code
$resource("/user/categories_brands" ,{},{ TypeGetCategoryAndBrand:{method: 'get', isArray:true}})
If the documentation is to be believed than with the error your getting I'd try to pass this in the form of an array and not an object to see if you get the same response.