Currently, I am utilizing this type of resource:
var Products = $resource('companies/:companyId/products')
However, the issue arises when I attempt to access the products from all companies via the URL companies/products
. Instead of receiving the desired result, I end up with companies//products
. Is it necessary to create a separate resource for this scenario or is there an alternative solution?
One possible solution in this specific instance could involve modifying the URL to companies/products/:companyId
, although this may be too broad of a change.