From the documentation:
Action isArray
$resource(url,[paramDefaults]isArray – {boolean=} – If true then the returned object for this action is an array,[actions]); 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.